In the preceding example, the value of ADD-COUNTER is added to the
CONTROL FOOTING FINAL counter every time the FIRST-DETAIL-LINE
report group is generated.
10.8.12 Restricting Print Items
In a Report Writer program, the GROUP INDICATE clause eliminates repeated
information from report detail lines by allowing an elementary item in a DETAIL
report group to be printed only the first time after a control or page break. The
following example illustrates the use of this clause:
01 DETAIL-LINE TYPE DETAIL LINE PLUS 1.
05 COLUMN 1 GROUP INDICATE PIC X(6) VALUE "SALES:".
*
05 COLUMN 10 PIC X(10) SOURCE BRANCH.
*
These statements produce the following lines:
SALES:
The next two examples are nearly identical programs; the only difference is the
use of the GROUP INDICATE clause in the second example.
The following program does not contain a GROUP INDICATE clause:
It produces the following output:
The following example contains a GROUP INDICATE clause:
10.8 Programming a Report Writer Report
(prints only the first time after a control or page break)
(prints each time)
BRANCH-A
BRANCH-B
BRANCH-C
01
DETAIL-LINE TYPE IS DETAIL
02 COLUMN 1 PIC X(15)
02 COLUMN 20 PIC 9(6)
1
123456789012345678901234567890
Name
Rolans R.
Rolans R.
Rolans R.
Vencher R.
Vencher R.
Vencher R.
Vencher R.
Anders J.
Anders J.
Anders J.
01
DETAIL-LINE TYPE IS DETAIL
02 COLUMN 1 PIC X(15)
02 COLUMN 20 PIC 9(6)
Producing Printed Reports
LINE IS PLUS 1.
SOURCE A-NAME.
SOURCE A-REG-NO.
2
3
Registration
Number
123456
123457
123458
654321
654322
654323
654324
987654
987655
987656
LINE IS PLUS 1.
SOURCE A-NAME
GROUP INDICATE.
SOURCE A-REG-NO.
Producing Printed Reports 10–37