Summary [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
Summary
In this lesson you created a report that accessed two different data
files. In creating this report, you used the following report
facilities.
* A start of report function.
* Sort field definitions.
* Record selection criteria (HP TurboIMAGE/iX and KSAM only).
* File linkages and a post link read function (HP TurboIMAGE/iX and
KSAM only).
* A before print function associated with a report line.
Start of Report Functions
A start of report function allows you to display a screen to obtain
values for reporting from the user. The start of report function is the
only report function that can display a screen.
Sort Field Definitions
The sort field definitions for a report define the report control breaks.
A control break occurs whenever the value in a sort field changes from
one record to the next.
At a control break, HP ALLBASE/4GL prints subtotal and subheading line
groups. These line groups can contain subtotal values that have been
accumulated in one of the *TOTALS(n) communication area fields.
You can define sorting fields even if the primary report file is in the
correct order. HP ALLBASE/4GL still uses the sort fields to define the
control breaks for the report.
Record Selection Criteria
Report record selection criteria allow you to select records that are
printed on the report. The selection criteria specify a range of values
for a field on the record read from the report primary file or a link
file.
If the value in the specified field does not fall within the specified
range, the record is not included in the report.
If you are creating the HP ALLBASE/SQL based application, you can also
select records using a SELECT command in an SQL logic block.
File Linkages
If you are creating the HP ALLBASE/SQL based application, you can perform
file linkages by creating an HP ALLBASE/SQL select list.
For other data managers, you can perform file linkages, using the File
Linkages screen. File linkages allow you to retrieve data from a file
other than the primary report file. File linkages are defined on a line
group basis.
Before HP ALLBASE/4GL prints the line group, it performs the initial read
of the link files defined for the line group. The data retrieved by the
link read can be included in the initiating line group. The data can
also be included in link print line groups.
You can specify that a function is executed after the link file read.
Print Line Functions
HP ALLBASE/4GL allows you to execute a function before and after each
physical report line is printed. In this report, you used a before print
function to substitute a different print line if an option file read
fails to find any options for a product.
Calculated Items
This lesson also introduced calculated items. You will complete the
definition of the option_cost calculated item in the next lesson.
MPE/iX 5.0 Documentation