` Printed Icetips Article

Icetips Article



Par2: Multiple sort orders in a report
1998-12-02 -- Dennis Evans
 
Everything you need is already included in the ABC classes.

You want to change three basic items, sort orders, range limits and filters.

Sort order,  take a look at the ViewManager class, AddSortOrder.  This
method uses a key as its parameter, let your user select the key to sort by,
then pass the key to the report as a parameter.
In the Window Manager init method embed add something
like this :

ThisReport.AddSortOrder( KeyPassed )
Now your sort order is set on the key the user selected.

Note :
If you defined the report with a key then add this line
ThisReport.SetSort(2)
If you set the report up to print in record order then there will
only be one sort order, no need to call SetSort.

For the filter and range limits, check out the types of
parameters these methods use,  SetFilter, AddRange,
SetSort, AppendSort.

Pass those to the report and call the appropriate methods.

The example application People, in the sub-dir reports, does this with three
drop down list boxes.
Normally I call these types of reports from the browse screen, after the
user has selected the tab, range, filter etc.

With the ABC classes you just about print a report any way
you can imagine.



Printed November 23, 2024, 2:06 am
This article has been viewed/printed 35200 times.