PRINT

From CometWiki

Revision as of 11:34, 6 June 2009 by Badge (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PRINT

Syntax:
PRINT field-name[;field-name][;field-name]
Placement:
Place the PRINT command after the REPORT command.
Discussion:
The PRINT command specifies which fields will be printed, as well as the sequence (left to right) in which the fields will be printed.
If the data dictionary (#CFILES) contains edit masks for numeric fields, they will be used on the report.

Line continuation

To continue the PRINT command to the next line, end the line with a ";" and continue on the next line.

Examples:
To print a single line report (one where the fields from a single record are displayed on one line), use the PRINT command with the names of the fields to be printed:

 PRINT A;B;C
 

If the field names do not fit on one report specification line, use the line continuation character (;) and list subsequent field names on the following line(s):

 PRINT CUST.NUMBER;CUST.NAME;CREDIT.LIMIT;CURRENT.AR;
       AR.OVER.30.DAYS;AR.OVER.60.DAYS;AR.OVER.90.DAYS;
       AR.OVER.120.DAYS
 

Note:
The indentation shown in the second and third lines of the above example is optional.
Indentation is used to make the report specification easier to read;
it does not affect the processing of the report commands.

To print a multiple-line report, enter multiple PRINT statements such as:

 PRINT A;B;C
 PRINT D;E;F
 

A common use of multiple PRINT statements is a report that prints labels from the CUSTOMER MASTER FILE.

 LINES 0
 NOHEADINGS
 SKIPPING 1
 INDENT n
 INPUT CUSTOMER
 REPORT
 PRINT CUST.NAME
 PRINT ADDRESS.1
 PRINT CITY;STATE;ZIP.CODE
Personal tools