Placing a Report Heading or Footing on Its Own Page

How to:

In a PDF report or an HTML report displayed in the WebFOCUS Viewer, you can request that a report heading or footing appear on its own page to set off important information. For example, you might want to create a cover page that flags salary information as Confidential and is separate from the actual data.

Syntax: How to Position a Report Heading or Footing on Its Own Page

Each heading or footing line must begin and end with a double quotation mark.

ON TABLE PAGE-BREAK AND {SUBHEAD|SUBFOOT}
"content ... "
["content ... "]
.
.
.
["content ... "]

where:

PAGE-BREAK
Determines when a new page starts. Use with the SET LINES command to control the length of a printed page.
SUBHEAD
Generates a report heading.
SUBFOOT
Generates a report footing.
content
Heading or footing content can include the following elements, between double quotation marks. If the ending quotation mark is omitted, all subsequent lines of the request are treated as part of the report heading.
text
Is the heading or footing text. You can include multiple lines of text.

The text must start on a line by itself, following the SUBHEAD or SUBFOOT command.

Text can be combined with variables and spot markers.

For related information, see Limits for Headings and Footings.

variable
Can be any one or a combination of the following:

Fields (real data source fields, virtual fields created with the DEFINE command in a Master File or report request, calculated values created with the COMPUTE command in a request, system fields such as TABPAGENO). You can qualify data source fields with certain prefix operators.

Dialogue Manager variables.

Images. You can include images in a heading or footing.

For details, see Including an Element in a Heading or Footing.

spot marker
Enables you to position items, to identify items to be formatted, and to extend code beyond the 80-character line limit of the text editor.

<+0> divides a heading or footing into items for formatting. For details, see Identifying a Report Component in a WebFOCUS StyleSheet.

</n specifies skipped lines. For details, see Controlling the Vertical Positioning of a Heading or Footing.

<-n positions the next character on the line. For details, see Using Spot Markers to Refine Positioning.

<0X continues a heading or footing specification on the next line of the request. For details, see Extending Heading and Footing Code to Multiple Lines in a Report Request.

Note: When a closing spot marker is immediately followed by an opening spot marker (><), a single space text item will be placed between the two spot markers (> <). This must be considered when applying formatting.

Blank lines
If you omit all text, variables, and spot markers, you have a blank heading or footing line (for example, " ") which you can use to skip a line in the heading or footing. (You can also skip a line using a vertical spot marker, such as </1.)

Example: Positioning a Report Heading on a Separate Page

Using PAGE-BREAK, this request generates a two-page report, with important information by itself on the first page.

TABLE FILE CENTORD
SUM ORDER_DATE LINEPRICE AS 'Order,Total:'
BY HIGHEST 5 ORDER_NUM 
ON TABLE PAGE-BREAK AND SUBHEAD 
"CONFIDENTIAL COMPANY INFORMATION"
"March 2003"
HEADING
"Order Revenue"
" "
ON TABLE SET PAGE-NUM OFF 
ON TABLE SET ONLINE-FMT PDF 
END

The first page of output identifies the confidential nature of the report and the date.

The second page of output contains the column titles and data.

Tip: To produce comparable results in HTML, include the following code in the request to turn on the WebFOCUS Viewer.

ON TABLE SET ONLINE-FMT HTML
ON TABLE SET WEBVIEWER ON 
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

The first page will display the report heading. You can navigate to the second page for the report data.

Example: Positioning a Report Footing on a Separate Page

Using PAGE-BREAK, this request generates a two-page report with the report footing, which signals the end of the report, on a page by itself.

TABLE FILE CENTORD
HEADING
"Order Revenue"
" "
SUM ORDER_DATE LINEPRICE AS 'Order,Total:'
BY HIGHEST 5 ORDER_NUM 
ON TABLE PAGE-BREAK AND SUBFOOT 
"END OF REPORT"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT PDF
END

The first page of output contains the column titles and data.

The last page of output signals the end of the report.

Note: To produce comparable results in HTML, include the following code in the request to turn on the WebFOCUS Viewer.

ON TABLE SET ONLINE-FMT HTML
ON TABLE SET WEBVIEWER ON 
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

The first page of output will contain the column titles and data. You can navigate to the last page to see END OF REPORT.