Creating a Page Header Template

Many reports have titles, page numbers, dates and other fields that appear at the top of each page. This is called the page header.

A typical page header.

 

Monarch Classic allows you to create a special page header template which is designed to capture useful page header information. Page header templates also help with applying the correct pagination to a report, as well as ensuring that templates work correctly when blocks of data are interrupted by page header information.

Note: The following instructions assume that you are familiar with the template creation process. If you are not, refer to Creating a Template before proceeding.

  1. Go to Report Design.

  2. Inspect the first few pages of the report to identify the page header. Page header fields may be arranged on a single line, or in a multiple line block, as in the above illustration.

  3. Click down in the line selection area to the left of the first line, then drag down to highlight the entire page header.

  4. Select New Template on the Report Design ribbon.

  5. Select Page Header as the template role.

  6. Create a trap to capture all instances of the page header.

    Most reports have a form feed character (character code 12) embedded at the end of each page. Page breaks are indicated on screen by a horizontal dashed line. If your report has form feed characters, Monarch Classic can use the occurrence of the page break to identify the beginning of each page header. In this case, you do not need to create a trap.

    Use the vertical scroll bar to inspect the page breaks in your report. If the page breaks always occur immediately before the page headers, you do not need to set a page header trap.

    For reports without form feed characters, Monarch Classic inserts a page break approximately every 100 lines throughout the report. You can change this setting using the Force Page Break After n Lines setting in the Input tab in the Options dialog. However, if page headers occur at odd intervals, setting the page length will not help. In this case, you will need to create a trap to identify the location of the page headers. It is a good idea to do this even if you do not want to extract fields from the page header because the Report window's Go to Page command and the Table window's Display Source of Record command will work more efficiently if page breaks are defined.

  7. Use the vertical scroll bar to scroll through the report. View enough of the report to satisfy yourself that the trap captured all instances of the page header. If the trap missed a page header, inspect the page header to determine what modifications you need to make to the trap. After making the modifications, repeat this step.

    After you are satisfied that the trap is working to capture all of the page headers, but no other report levels, you are ready to highlight the page header fields you want to extract.

  8. Highlight each page header field you want to extract.

  9. Name each field. To do so, position the cursor on top of the first field highlight, then select Edit Field on the action bar to display the Field Properties window, type the field name, then choose OK. Repeat for each field.

    Note: Fields can also be named via the Field List window.

  10. Name and accept the template. To do so, simply type a name for the template in the Name box at the top of the Template Definition dialog.

  11. Select Run Report Verify on the Report Design ribbon.

    A progress dialog displays the current status of the verify operation. If Monarch Classic finds a field with characters adjacent to its boundaries, it highlights the field and suspends the verify operation. Inspect the field to determine whether it should be modified to include the extra characters. After making any modifications, choose Run Report Verify again to check the new field definitions. When the verify operation is complete, the Verify Progress dialog is removed.

     

 

 

(c) 2023 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support