Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
The HEADING command produces titles and column headings for a report. The heading output is sent to the current outfile. The form of the HEADING command is the same as that of the ROW command. When you use HEADING, however, Oracle OLAP does not add any numeric values from the heading to column subtotals or grand totals.
Frequently, HEADING commands are used in a PAGEPRG program to produce titles or column headings on each page of a report.
Syntax
HEADING [attribs] {expression1|SKIP}, [attribs] {expressionN|SKIP}
Arguments
The attributes that specify the format for each column. (See ROW command for a list and detailed explanation of the available attributes.)
The text to be used as a column heading. To use literal text for a column heading, enclose the text in single quotes. (See ROW command for more information on using expressions, attributes, and ACROSS groups to produce columns.)
Used in place of an expression to indicate that the column is to be left blank.
Notes
To create a title or subtitle in a report, use HEADING to produce a single "column" with a width equal to the setting of the LSIZE option. You can then center your text within this "column" to produce a centered title.
The maximum width of any line in a report, including a heading line, is 4000 characters.
When you know ahead of time that you will not need the subtitling capability of the ROW command, using the HEADING command instead of ROW to produce the lines of your report can provide a time savings, since Oracle OLAP will not be keeping track of subtotals.
The notes for the ROW command also apply to the HEADING command (with the exception of the note on row and column arithmetic in ROW).
Examples
Example 14-7 Producing Column Headings
In a report, you want to have headings for your columns. You can use a HEADING command such as the following in your program.
HEADING UNDER '-' CENTER <WIDTH 15 'Product' - ACROSS district FIRST 3: district>
This command produces the following result.
Product Atlanta Boston Chicago --------------- ---------- ---------- ----------