Producing Printed Reports
10.9 Report Writer Examples
Figure 10–19 (Cont.) EX1010.LIS Listing
CUSTOMER MASTER FILE REPORT
+--------------------------------------------------------------------------------------------------------------+
|
NAME
|
|--------------------------------------------------------------------------------------------------------------|
| LAST
| FIRST
|MI|
+--------------------------------------------------------------------------------------------------------------+
TOTAL RECORDS:
TOTAL RECORDS:
TOTAL RECORDS:
GRAND TOTAL RECORDS:
10.10 Solving Report Problems
Several variations to the basic report format are discussed in the next sections.
10.10.1 Printing More Than One Logical Line on a Single Physical Line
When your report has only a few columns, you can print several logical lines
on one physical line. If you were to print names and addresses on four-up
self-sticking multilabel forms, you would print the form left to right and top
to bottom, as shown in Figure 10–20 and Example 10–11. To print four-up
self-sticking labels, you must format each logical line with four input records.
However, if the columns must be sorted by column, the task becomes more
difficult. The last line at the end of the first column is continued at the top of the
second column of the same page, indented to the right, and so forth, as shown
in Figure 10–21 and Example 10–12. Example 10–12 defines a table containing
all data to appear on the page. It reads the input records, stores the data in the
table as it is to appear on the page, prints the contents of the table and then fills
spaces. When it reaches the end of file, the remaining entries in the table are
automatically blank. You can extend this technique to print any number of logical
lines on a single physical line.
10–82 Producing Printed Reports
ADDRESS
STREET
|
CITY
1
1
1
32
C O M P A N Y
C O N F I D E N T I A L
C O M P A N Y
C O N F I D E N T I A L
*******************************
*
*
Customer Master File
*
*
11-08-2000
*
*
End of Report EX1010
*
*******************************
|
INVOICE
|ST| ZIP
| DATE
| NUMBER|
AMOUNT
***************************************
*
INVOICE SUB TOTAL:
$87,690.00 *
***************************************
***************************************
*
INVOICE SUB TOTAL:
***************************************
***************************************
*
INVOICE SUB TOTAL:
$78,900.00 *
***************************************
******************************************
*
GRAND TOTAL INVOICES:
$732,927.86 *
******************************************
*
*
*
*
*
*
*
PAGE
4
|
|
$6.00 *
VM-0664B-AI
Need help?
Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?
Questions and answers