Defining Report Sorting Levels [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
Defining Report Sorting Levels
The report sorting levels determine the order in which the report items
are listed, and also define control break levels.
Control breaks allow you to perform a variety of sub-heading and
sub-totalling tasks. A control break for a given sort level occurs each
time the value in a sort field value changes from one record to the next.
This report uses one control break to print the subtotal line after each
product.
Menu Path
To access the report sorting screen:
1. From the main menu, select the Reports option.
2. Choose Sorting.
Screen Description
This screen allows you to define up to eight sort fields, giving you a
total of eight control break levels. The sort fields must be data fields
on the primary file that you specified in the report header. For each
sort field, you must state whether the sort is to be in ascending or
descending order. You can also specify whether the file is already in
sequence.
Report Sorting Screen
To enter the field values:
Field Entry Explanation
---------------------------------------------------------------------------------------
Report Name prod_opt This is the name of the report that you are
defining.
Sort Fields The next 16 fields define the eight sort
fields and their sorting order. The sort
field numbers 1st through to 8th specify
the control break level and relate directly
to subheading line groups H1 - H8 and
subtotal T1 - T8 line groups.
The sorting order is either ascending or
descending. The collating sequence is
listed in the HP ALLBASE/4GL Developer
Reference Manual.
This report only uses the 1st sort field.
Table 11-0. (cont.)
Field Entry Explanation
---------------------------------------------------------------------------------------
1st Field Name product_no This is the name of the field on the
primary data file which forms the report's
first sort level and control break.
For this report, a control break occurs
every time a product record is read from
the primary report file.
ORDER A This specifies that the records are to be
sorted in ascending order.
Leave the remaining Field Name and ORDER
fields blank.
Is File already in Enter Y for KSAM or This indicates that the file is already in
sequence? SQL, N for the order when it is read by the key
TurboImage/ix specified on the header screen. In this
application, no sorting is done, but the
sort fields are used to initiate control
breaks.
To complete the screen:
1. Press the Commit Data function key to create the sorting
specifications and control break specifications for this report.
MPE/iX 5.0 Documentation