Record Formatting Function
The purpose of the record formatting capabilities is to move more of the output formatting function into the PAGEDEF and allow for greater flexibility in creating and changing output pages without changing the base application. Rather than the application generating page headers, page trailers and group headers for each page (and thereby fixing the page endings), the page headers, page trailers and group headers can be generated by a PAGEDEF layout, allowing the page endings to change as font sizes or data layouts change.
In order to visualize how the record formatting function can be used, review the first six pages of Record Formatting Examples. These examples show the output of an application before and after it is formatted with PAGEDEF using the record formatting functions.
These functions are provided by several PPFA commands (LAYOUT, DEFINE COLOR, DRAWGRAPHIC, and ENDGRAPHIC), and modifications to the PAGEDEF, PAGEFORMAT, FONT, CONDITION, and FIELD commands. This chapter provides an explanation of the record formatting functions with examples of their use. For details on the syntax of these commands, see Page Definition Command Reference .
Some of the functions that can be accomplished in a layout format with the record formatting commands include:
- Selecting different formatting for different types of Data Records/fields based on the Record ID. The output formatting can change mid-page independent of where the output occurs on a page.
- Defining page headers and trailers to be automatically printed on subsequent pages. The headers and trailers can incorporate data from the associated Data Record.
- Numbering the output pages.
- Inserting automatic page ejects when text reaches the bottom margin.
- Creating group headings to be printed at the beginning of a group of data. For example, you can create group headings (including column headings) to be repeated each time a different account type is formatted on a banking statement. An active group heading is automatically repeated on subsequent pages until the data group ends.
- Forcing page ejects to occur in the output.
- Creating boxes with or without black and white or color shading. A set of boxes for a table can be started in a group header and automatically ended and restarted on subsequent pages until the table completes.
- Creating graphical objects such as circles, ellipses, lines, graphs, and so forth in color or black and white output.
- Formatting database records created with field delimiters (rather than fixed length fields).
- Aligning field output to the left or right.