The PAGE-BREAK command enables you to control when a new page is created. You must use PAGE-BREAK with a sort field.
The format of the PAGE-BREAK command is:
ON sort_field PAGE-BREAK
PAGE-BREAK creates a new page to be started each time the specified sort field value changes. Place the PAGE-BREAK command after the sort field on which you want to break the page. This ensures that each section of the report remains separate from any other section.
To use PAGE-BREAK with commands that produce headings or footings, type PAGE-BREAK first, then on the same line, type the command of your choice.
You can use PAGE-BREAK to prevent information that should be grouped together from being fragmented over more than one page. This situation occurred in Including a Section Heading in a Report: SUBHEAD, when information for the Production department was displayed on two different pages.
You can solve that problem now using PAGE-BREAK. The page heading has been omitted from this request. Otherwise, it is the same request you issued in Including a Section Heading in a Report: SUBHEAD.
Issue the following request:
TABLE FILE EMPLOYEE SUM ED_HRS BY DEPARTMENT BY CURR_JOBCODE ON DEPARTMENT PAGE-BREAK SUBHEAD " " "------NEXT DEPARTMENT ------" " " END
Run the request. The output is:
Compare this report to its earlier version. The information for the Production department no longer shares a page with information from the MIS department.
You now know that, by default, each page is numbered consecutively from the number one (1). You can change the numbering sequence and print the first page within a sort field as Page 1 using the REPAGE command. To display the preceding report so that the first page for each new sort value is numbered 1, add the REPAGE command as follows.
Issue the following request:
TABLE FILE EMPLOYEE SUM ED_HRS BY DEPARTMENT BY CURR_JOBCODE ON DEPARTMENT PAGE-BREAK REPAGE SUBHEAD " " "----- NEXT DEPARTMENT -----" " " END
Run the request. The output is:
WebFOCUS | |
Feedback |