Progress
Report Builder
User’s Guide


Sort Levels and Ascending/Descending Order

You specify the sort order for a report by specifying sort levels (1-8) and whether each level is arranged in ascending or descending order.

Sort Levels

The first sort level of a report determines the first level of data sorting, the second level determines the second level of sorting, etc.

For example, if you specify Country as the first sort level, State as the second, and City as the third, Report Builder initially sorts the data by the customer’s country. It then sorts the records by state within each country, and then by city within each state.

This shows how such a sorting order would appear in the Sort Order dialog box:

In the Sort Order dialog box, Report Builder lists a number and a field name for each sort level. The number before the field name identifies the sort level. The number of the sort level determines the sorting order with sort level 1 as the highest level and sort level 8 as the lowest.

Ascending/Descending Order

By default, Report Builder arranges the field data in ascending order. Table 9–1 explains what ascending order means for different field data types.

Table 9–1: Ascending Sort Order by Data Type 
Field Data Type
Ascending Sort Order
CHARACTER
Alphabetical
NUMERIC
From negative to positive; from lowest to highest
LOGICAL
False before true
DATE
Chronological

You can mix ascending and descending levels within the same report definition. This means that the first and second sort levels could appear in ascending order and the third sort level could appear in descending order. For example, using the fields in the Progress Newsport database, you can specify Customer.Cust-Num as the first sort level in ascending order, Order-Order-Num as the second in ascending order, and Order-Line.Price as the third in descending order. This means that Report Builder initially sorts the data by the customer’s number (starting with the lowest customer number), then by each order number for the customer (starting with the lowest order number). Lastly, it sorts the records by the price of the items in each order (starting with the most expensive item).


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095