Skip to main content

Add page numbers, print date and user name

Print the page number, the date of printing and the name of the user at the bottom of every page. The example works on any document type.

Before you begin​

  • Open the designer from a saved document, on a template you may change. See Design an advanced report.
  • Use the Page Footer band: it prints on every page. If the template has none, right-click the report, point to Insert Band and choose Page Footer.

Steps​

Page number​

  1. Add a page information control to the Page Footer band.
  2. Select it. In the Properties panel, set Page Information to the page number with the total of pages, and enter a format such as Page {0} of {1}.
  3. If the numbering must not start at 1, change Start Page Number.
  1. Add a label to the same band. In the Expressions tab, set Text to ToDateTime(Now()). The function writes the date and time with the date format of the program options.

User name​

  1. Add a label. Set Text to GetUserName(). The function returns the name of the user who is signed in to the program and prints the document.

  2. To put words before the values, join them: 'Printed by ' + GetUserName().

  3. Click the Preview tab, then click Save.

Result​

Every page ends with a line such as Page 2 of 3, 05-12-2026 10:30:00 AM and Printed by Mona. The date is the moment of printing, not the date of the document. The user is the one who prints, not the one who created the document.

If something goes wrong​

SituationWhy it happensWhat to do
The footer prints once only.The controls are in a Report Footer band.Move them to a Page Footer band.
The date has another format.The format comes from the date format option of Program Options > Numbers.Change the date format there.
The page count is missing.Page Information is set to the page number only.Choose the page number with the total of pages.

This page applies to alameen ERP 10, version 10.1.79.764.