Taboga Software     |     home

SortReport Extension Template
This has to be one of the most useful templates we have ever done.     After you have started using this template you will ask yourself how you did before you had it.

How it Works
This template creates a local queue which will contain all the fields in the selected detail band, plus break fields, plus all specified hot fields.  This queue is then sorted as instructed in the template, and at the end of the report, it is printed from the queue.

DetailBand to Use:  Here you specify the detail band you want to turn  print from.
Available Fields:  This list box contains all the fields you have available in the queue for sorting.  To sort the report by any combination of these fields, simple click the fields you want to use.  If you need other fields, all you need to do is add “hot-fields” to the browse, and these are immediately available in your queue.
Sort Order:  Here you can specify the order of each particular element (ascending or descending).

Omit queue ADDing? :  You may want to do your own queue adding/sorting.   If you set this prompt, the template will go through all the records in the report, but will not add the queue records.  You need to write the code to add the queue entries.
Omit queue BUILDing?  If you want to altogether generate the queue yourself and not go through the report's records, set this prompt on.    Needless to say, to use this option you must have a pretty good understanding of how the template works, and what you want to do.
Display Progress when Printing?  Should we display a progress message when printing from the queue?

Here is an example where we are ordering by a calculated field!   

First we need to specify the order in which the file will be accessed.   This can be any order as soon as all records you want to display are considered.  In our example we want to list all products in the Products file, so we simple set up a standard clarion report  that will list all products.

At this point we can use any range limits or filters you want.

Now, you want to SORT those records read, and print the report by the price extension, and we want to show the price extension in descending order!  Easy with the SortReport extension template.    Simply populate the extension template, select the field or fields you want to sort on and you are done!

In our example, we just want to sort using the L:PriceExtension field.  As you can see below, the field is selected.   Once the field is selected, you can specify whether the sort will be ascending or descending!

Using this template you can print ordered by any field that occurs in the detail band, in group breaks, or in hot fields.
You can use the NewspaperColumns together with the SortReport template to produce custom sorted  and newspaper column reports.