Adding a Page and Maximum Page Number Items

You can insert the current page number in a report using the $PAGE text variable. Additionally, you can use the $MAXPAGE variable in conjunction with $PAGE to create a page numbering format similar to 1 of 25, 2 of 25, and so on for sequential pages. The $PAGE variable inserts the last page number in a report.

To demonstrate how to use the $PAGE and $MAXPAGE variables, complete the following steps:

  1. Open a cBase or model and build a tabular report or open the inserting_metadata marker if previously saved.

  2. Unlock the report and click the Add Item icon.

  3. Select Text as the Item Type and click the $PAGE variable. (If you are using the marker file, adjust the Vertical/Horizontal spacing to position the page number to the right side of the page below the $MODEL_FOOTER variable.)

  4. Click OK to insert Closedthe page number.

  5. To modify the page number format so that it shows the last page number in the report, double-click 1 to open the Edit Item dialog box.

  6. In the text box, modify the $PAGE format as follows: Page $PAGE of $MAXPAGE.

  7. Click OK to Closedview the report.

  8. Click File > Save > Save Marker as inserting_metadata to continue using this report in other topics.