To handle formatting procedurally, you must specify the data exactly as it is to print. Therefore, you must include spaces between columns when specifying the columns to print. The heading, provided as a literal or as one or more variables, must also contain spaces for the proper column alignment:
DO PRT‑HEAD
FOR EACH CUSTOMER
IF LINE‑CTR > 55
DO PRT‑HEAD
ENDIF
LIST CUSTOMER.CUSTID,' ',CUSTOMER.NAME
SET LINE‑CTR = LINE‑CTR + 1
ENDFOR
LIST NEWPAGE
. . .
<<PRT‑HEAD>> PROCEDURE
LIST NEWPAGE
LIST 'ID Name'
LIST SKIP
SET LINE‑CTR = 3
ENDPROC
Notice the use of LIST SKIP in the PRT‑HEAD procedure to force a blank line between the column headings and the detail lines. You can insert multiple lines by specifying SKIP as many times as the number of lines you want to skip. For example, to skip three lines specify:
LIST SKIP SKIP SKIP
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|