Previous Topic: Comments

Next Topic: Format Items


Sort Fields

The sort fields are the fields on which data records will be sorted before printing. These field names are stored with details of how sorting will be performed (for example, whether in ascending or descending order).

Sort fields are assigned a number to allow data to be sorted on several fields within a record. For example, if you want to sort Problem file records on severity within priority, the severity field would be defined as sort field 1 and the priority field would be defined as sort field 2.

The maximum number of sort fields that can be defined depends on the report application for which the report is defined.

For each sort field, there can be defined a control break header and/or control break trailer. These will be printed on a control break, that is, when the value of the sort field changes. A control break header could be used, for example, to print column headings that describe the data being printed. A control break trailer may be a total line, showing the total values of the data in the reported group of records.

Control break headers and trailers are linked to the sort field by the sort field number, which is stored as part of their definition. So, for example, when the value of sort field number 1 changes, the control break trailer assigned to it (if one is defined) will be printed before processing continues.