Oracle® OLAP DML Reference 11g Release 1 (11.1) Part Number B28126-01 |
|
|
View PDF |
The STDHDR program generates the standard Oracle OLAP heading at the top of every page of report output.
The standard running page heading consists of two lines. The first line includes the date and time on the left and the page number on the right. The second line is blank.
The heading output is sent to the current outfile.
Syntax
STDHDR
Notes
Setting LSIZE
LSIZE must be set to a value of at least 29
before you use STDHDR. Otherwise the heading will not look right. A value less than 26
produces an error. The default for LSIZE is 80
.
Creating a Custom Heading
When PAGING is set to YES
, Oracle OLAP automatically inserts the standard heading at the top of each page of output. To get a different heading you must write a program that produces the heading and set the PAGEPRG option to the name of that program. To return to the standard heading, set PAGEPRG to 'STDHDR'
. (See the PAGEPRG option for more information.)
Using STDHDR in a Heading Program
When you use PAGEPRG to specify a heading program, you can still use the standard heading in your custom heading by executing STDHDR as part of your program. Generally, you place STDHDR before the statements that produce your customized heading. See Example 10-151, "Creating a Custom Heading for a Report".
The STDHDR Program
The STDHDR program uses the HEADING and CONVERT commands, as follows.
HEADING L W 8 <CONVERT(TODAY, TEXT,'<DD><MTXTL><YY>') TOD> - R W LSIZE-25 'Page ' L W 6 D 0 PAGENUM BLANK
Examples
Example 10-151 Creating a Custom Heading for a Report
Suppose you would like each page of your report to include the standard header and also the customized title "Annual Sales Report." To accomplish this, define a small PAGEPRG program called report.head.
DEFINE report.head PROGRAM PROGRAM CALL STDHDR HEADING WIDTH LSIZE CENTER 'Annual Sales Report' BLANK END
In your report program, set PAGING to YES
, and specify the preceding program to execute after every page break by setting the PAGEPRG option to 'REPORT.HEAD'
(see the PAGEPRG option for further information). When you run the report, each page will contain the following combination of the standard heading and your custom heading.
18Jan97 15:05:16 PAGE 1 Annual Sales Report