Report Commands

Commands that apply to the entire report are described in the following table.

Command Description
$REPORT/$ENDRPT Marks the beginning and ending of a report format definition in a program.
$PRINTFILE Defines the print file for each group in the report.
$PGBRKCNTL Defines the kind of page-break control a report uses.
$PAGESIZE Defines the page size for the report.

$REPORT/$ENDRPT

$REPORT ReportName

$ENDRPT

The $REPORT/$ENDRPT command pair marks the beginning and ending of a report format definition in a program.

ReportName is a 4GL variable name. The name can be up to 20 characters long. The variable name must be unique in the program definition ($PROGRAM). For ReportName use the format

ProgramCode-R n

ProgramCode is the five-character program name, and n is the number of this report definition in the program (for example, GL220-R1, GL220-R2).

The $REPORT/$ENDRPT command pair can occur a maximum of ten times in a report definition file.

$PRINTFILE

$PRINTFILE PrintFileName

The $PRINTFILE command defines the print file each group in the report uses when it prints.

The default print file is PRINT1. The program cannot use this print file for any other data. If a program has more than one report, you must use $PRINTFILE to define a data set. The print data sets are PRINT1, PRINT2, PRINT3, and so on.

The $PRINTFILE command occurs once for each $REPORT/$ENDRPT command pair in a report definition file. $PRINTFILE is optional in a report definition file containing one report.

$PGBRKCNTL

$PGBRKCNTL PgBrkType

The $PGBRKCNTL command defines the kind of page-break control a report uses. The three page break options are None, Manual, and Full (the default).

Use For
NONE No page break control. The program must perform all header reprinting on a page break.
MANUAL Automatic header reprinting at a page break. The program controls which headers reprint on a page break.
FULL Automatic header reprinting at a page break. In each $GROUP, the $LEVEL command defines which headers reprint on a page break. This is the default.

$PAGESIZE

$PAGESIZE NumberOfLines or CONTINUOUS

The $PAGESIZE command defines the page size for the report. If you type CONTINUOUS rather than a number, page breaks do not occur. $PAGESIZE is specified in each report. Each report in a program can have a different $PAGESIZE. If you do not define $PAGESIZE for a report, the report page size defaults to 60 lines per page. (The page size is 66 with overflow beginning at 60.)