Compaq COBOL AAQ2G1FTK User Manual

Page 329

Advertising
background image

Producing Printed Reports

10.8 Programming a Report Writer Report

01

REPORT-HEADER TYPE IS REPORT HEADING.

01

PAGE-HEADER TYPE IS PAGE HEADING.

01

CONTROL-HEADER TYPE IS CONTROL HEADING CONTROL-NAME-1.

01

DETAIL-LINE TYPE IS DETAIL.

01

CONTROL-FOOTER TYPE IS CONTROL FOOTING CONTROL-NAME-2.

01

PAGE-FOOTER TYPE IS PAGE FOOTING.

01

REPORT-FOOTER TYPE IS REPORT FOOTING.

10.8.5 Vertical Spacing for the Logical Page

You use the LINE clause for positioning vertical lines within a report group or
for indicating vertical line space between two report groups. The LINE clause
indicates the start of an absolute print line (a specific line on a page) or where a
relative print line (an increment to the last line printed) is to print on the page.
You can use this clause with all report groups.

In the following example, the LINE clause indicates that this report group begins
on absolute line number 5 on a page. LINE IS 7 indicates that this report group
has a second line of data found on absolute line number 7. Absolute line numbers
must be specified in ascending order.

01

PAGE-HEADER TYPE IS PAGE HEADING.
02

LINE IS 5.

.
.
.
02

LINE IS 7.

In the following example the term PLUS in the LINE clause indicates that
DETAIL-LINE prints two lines after the last line of the previous report group.
If you used a CONTROL HEADING report group that ended on line 20 before
DETAIL-LINE, then DETAIL-LINE would print beginning on line 22.

01

DETAIL-LINE TYPE IS DETAIL.
02

LINE PLUS 2.

In the following example the LINE clause specifies that the REPORT FOOTING
report group prints on line 32 of the next page:

01

REPORT-FOOTER TYPE IS REPORT FOOTING.
02

LINE IS 32 ON NEXT PAGE.

You can code NEXT PAGE only for CONTROL HEADING, DETAIL, CONTROL
FOOTING, and REPORT FOOTING groups, and only in the first LINE clause in
that report group entry.

Within the report group, absolute line numbers must be in ascending order
(although not consecutive) and must precede all relative line numbers.

You can use the NEXT GROUP clause instead of the LINE clause to control line
spacing. In NEXT GROUP clause, you specify the amount of vertical line space
you want following one report group and before the next. You use this clause in
the report group that will have the space following it, as shown in the following
example:

01

CONTROL-HEADER TYPE IS CONTROL HEADING CONTROL-NAME-1
NEXT GROUP PLUS 4.

01

DETAIL-LINE TYPE IS DETAIL.

This example indicates relative line use. The report group (DETAIL) immediately
following this CONTROL HEADING report group will print on the fourth line
after the CH’s last print line.

Producing Printed Reports 10–29

Advertising