What is an HP ALLBASE/4GL Report? [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
What is an HP ALLBASE/4GL Report?
Some of the concepts in this chapter may be new to you if you haven't
used a report generator before. An HP ALLBASE/4GL report is not created
or processed in a physical line by line manner as most reports are. An
HP ALLBASE/4GL report is an arrangement of print lines defined by you,
and printed in an order determined by the report processor based on your
definition of the report.
Format of a Report
The data included in a report is taken from a data file called the
report's primary file. Data can also be included from other files as
well. This is done by using file linkages to the other files. The
report processor reads through the primary file sequentially and creates
a temporary file to produce the actual report. The temporary file
contains the records that meet the defined selection criteria, and they
are sorted according to the specified sort sequence. Once the selection
and sorting process of records from the primary file is complete, the
report processor sequentially prints the records from the temporary file.
Three important concepts in HP ALLBASE/4GL reports are:
* Line groups.
* Line numbers.
* Totalling facilities.
The following descriptions provide an overview of these concepts.
Line Groups
The format of an HP ALLBASE/4GL report is defined by a series of
different line groups. A line group is a logical entity that the report
processor prints at a certain stage in the report printing process. HP
ALLBASE/4GL allows you to use a number of different line groups. They
are identified as follows:
Name Description
P1 Top of page headings.
C1 Column headings.
B1 Bottom of page footings.
D1 to D9 Detail lines.
E1 to E9 Extra lines.
H1 to H8 Subheading lines.
T1 to T8 Subtotal lines.
TF Final total line.
As their descriptions suggest, HP ALLBASE/4GL processes each line group
at a different stage of the report. For example, HP ALLBASE/4GL prints
the P1 line group at the start of a new page, followed immediately by the
C1 line group. When the report concludes, HP ALLBASE/4GL prints the TF
line group. A line group that is not defined for a report will not be
printed. Only the D1 line group must be defined for each report. HP
ALLBASE/4GL prints a D1 line group for each record selected for
reporting.
Line Numbers
You may be wondering why line groups are named groups. A line group may,
in most cases, consist of up to 99 physical print lines. The following
table summarizes the number of lines that may be used within each line
group.
Line Group Line Number Range
P1 1 to 99
C1 1 to 3
B1 1 to 9
D1 to D9 1 to 99
E1 to E9 1 to 99
H1 to H8 1 to 99
T1 to T8 1 to 99
TF 1 to 99
Each time the report processor prints a line group, all of the line
numbers defined for that line group are printed. They are treated as one
logical entity.
Totalling Facilities
Most reports usually require some type of totalling. With HP ALLBASE/4GL
reports there are a number of automatic totalling facilities available.
The totals are maintained in a number of communication area fields.
These are as follows:
Name Description
*TOTALS(1) - (16) Totals fields 1-16 allow you to total
values down your report. You can
accumulate the values in one field on many
lines.
*CROSS(1) - (5) Cross fields 1-5 allow you to total values
across a physical line. You can accumulate
the values from several fields that appear
on one line.
*COUNT(1) - (5) Count fields 1-5 will count the number of
times that a specified print line has been
printed.
With this basic outline of a report, you can now create a report for the
product file.
MPE/iX 5.0 Documentation