BEGIN-HEADING
Syntax
BEGIN-HEADING heading_lines_int_lit [FOR-REPORTS=(ALL| report_name1[, report_namei]...)] [FOR-TOCS=(ALL|toc_name1[, toc_namei]...)] [NAME={footing_name}] END-HEADING
Description
Begins a HEADING section.
The HEADING section defines and controls information to be printed at the top of each page.
You must define the report_name in a DECLARE-REPORT paragraph. If you do not use DECLARE-REPORT, the heading is applied to all reports. You can also specify FOR-REPORTS=(ALL). Note that the parentheses are required.
You can specify more than one BEGIN-HEADING section; however, only one can exist for each report. A BEGIN-HEADING section with FOR-REPORTS=(ALL) can be specified followed by other BEGIN-HEADING sections for specific reports, which override the ALL setting.
You must define the toc_name in a DECLARE-TOC paragraph. You can also specify FOR-TOCS=(ALL). Note that the parentheses are required.
You can specify more than one BEGIN-HEADING section; however, only one section can exist for each table of contents. A BEGIN-HEADING section with FOR-TOCS=(ALL) can be specified, followed by other BEGIN-HEADING sections for specific tables of contents, which override the ALL setting.
The BEGIN-HEADING section can be shared between reports and a table of contents.
You can print outside the heading area of the report—that is, in the body area—from the heading, but you cannot print in the heading area from the body.
Parameters
| Parameter | Description |
|---|---|
|
heading_lines_int_lit |
The number of lines to be reserved at the top of each page. |
|
FOR-REPORTS |
Specifies the reports to which this heading applies. This is required only for a program with multiple reports. If you are writing a program that produces a single report, you can ignore this argument. |
|
FOR-TOCS |
Specifies the table of contents to which this heading applies. |
|
NAME |
Specifies the name to be associated with this heading section. This option cannot be used if FOR-REPORTS or FOR-TOCS is also specified. Use this parameter with the ALTER-REPORT command. The name cannot be NONE or DEFAULT. |
Example
The following example illustrates the BEGIN-HEADING command
begin-heading 2 ! Use 2 lines for
print $current-date (1,1) edit MM/DD/YY ! heading,
print 'Sales for the Month of ' (1,30) ! 2nd is blank.
print $month ()
end-heading
begin-heading 2 for-tocs=(all)
print 'Table of Contents' (1,1) bold center
end-heading
See The ALTER-REPORT command
for information about dynamic headings/footings
See The DECLARE-LAYOUT command
for information about page layout
See The DECLARE-REPORT command
for information about programs with multiple reports
See The DECLARE-TOC command
for information about Table of Contents
See The END-HEADING command