Adding Page Number in RML templates

This entry guides you through the steps on adding page numbers to your report templates using a simple script.


Scenario:

  • Show page number at page footer.
  1. Add a label into your RML template and choose “Script” as the Field Type.
    image

  2. Add the following script: “${#} of ${##}”
    For example,
    image

  3. Save the RML template and render as your desired output.


Sample RML template:

PDF Output Example: