LINE

Describe a line

LINE REPORT_HEADER|REPORT_FOOTER [VISIBLE|NOTVISIBLE] [NOTSEPARATE]
[NUMBLANK LINES blank_lines]

or

LINE PAGE_HEADER|PAGE_FOOTER [VISIBLE|NOTVISIBLE] 
[NUMBLANK LINES blank_lines]

or

LINE PRE-BREAK|POST-BREAK [IF conditional_spec] [SUPPRESS BLANKLINE] 
BREAKFIELD field_spec [SID sid]

or

LINE DETAIL [IF conditional_spec]

VISIBLE

(optional) Includes the contents of a report header, report footer, page header, or page footer section in the report. The default is to include both header sections and exclude both footer sections.

NOTVISIBLE

(optional) Excludes the contents of a report header, report footer, page header, or page footer section from the report. The default is include both header sections and exclude both footer sections.

NOTSEPARATE

(optional) Causes the report header and footer sections to be on the same page as other report text. The default is for the report header and footer sections to be on separate pages.

NUMBLANK LINES blank_lines

(optional) The number of blank lines between the header and footer sections and the body of the report. Use then NOTSEPARATE is specified.

IF conditional_spec

(optional) Specifies a condition or set of conditions in a report. This line appears in the report only when the conditional evaluates to true. See Condition_spec definition.

SUPPRESS BLANKLINE

(optional) Suppresses printing of a line (the following line for a pre-break line or the preceding line for a post-break line) if the line is blank (i.e., contains no data or all conditionals on all fields are false). See Suppressing a blank line for more information.

BREAKFIELD field_spec

(optional) A specification for a sort field in a report. See Field_spec definition. This keyword is only valid for pre-break and post-break lines to designate at which sort level they should be printed.

SID sid

(optional) The sort field identification number that indicates the sequential number of the sort field specified by field_spec. This is required when you are sorting on the same field more than once. For example, if your SORT statement for the current report is

SORT company BY name BY name BY date

and you wanted to specify the second name break field, the sort field identification number would be 3 because the second name is the third sort field.

The LINE statement describes the contents of a line within the report layout. At a minimum, you must specify the line type keyword. If there are several lines in your report, you must follow this order to ensure that your report is generated correctly:

Report header

Page header

Pre-break line

Detail line

Post-break line

Page footer

Report footer

Note

All FIELD and TEXT statements are associated with the most recently defined line. If a page header line is the most recently defined line, any subsequent TEXT or FIELD statements will turn off the default field headers mode.

ReportWriter only generates the SID keyword and sort field identification numbers when you are sorting on the same field twice.

In the example below, the report header will default to the report name and will be on a separate page. The page header will default to containing the column headings for the detail line fields. The pre-break line will be printed in the report only if TEMP.STATE and CUST_TAG.STATE are equal, and the blank line that would normally appear in the event of a false conditional will be suppressed. The break level at which the pre-break line should be printed is defined by the TEMP.STATE field.

LINE REPORT_HEADER
LINE PAGE_HEADER
LINE PRE-BREAK IF CUST_TAG.STATE EQ TEMP.STATE
SUPPRESS BLANKLINE BREAKFIELD TEMP.STATE 
LINE DETAIL
FIELD CUST_TAG.CUST_NAME COLUMN 1 HEADER "Customer name"
FIELD CUST_TAG.STATE COLUMN 20 HEADER "State" 
FIELD ORD_ID COLUMN 24 HEADER "Order ID" JUST LEFT
FIELD ORD_ITEM COLUMN 32 HEADER "Product ID" JUST LEFT