ReportSmith 3.0 - need help


I am using ReportSMith 3.0 (condolences accepted) with Delphi 2.0
and have a simple list report. What I want to do is be able to let
the user determine the sort order prior to when I run the report
(I don't want them to change it from ReportSMith, but from Delphi).

I have it working, but it is a little inelegant. I load the report
with the default sort order, then I do a RunMacro with the following

Dim ds as DataSet
ds.AddSort ...

This works, but I essentially calc the report twice. Ideally, I'd
like to do the AddSort prior to the load. This is where the problem

I found I could make a macro linked to a Before Report Open event
in which I would do a ds.SetFromLoading in place of the SetFromActive.
This has the effect I want, BUT I can't programmatically get the
AddSort parameter to ReportSmith. The problem is that the Before Report Open
event occurs before report variables are requested, so I can't pass
the report sort order as a variable.

Any ideas on how I can do this right? (I know, I know, buy a different
report tool -- but, assume for now that I need to use RS 3.0.)

Please reply via email