Display a Page Count in SSRS

OverallTotalPages

When creating SSRS reports, it is great to add informational things in the footer. To create a footer, simply right click anywhere outside of the report body, and click on:
Add Page Footer.
One item that I put in all of my SSRS reports is a Date Printed and a Page X of Y. Date printed is easy enough. You simply add a text box to the footer and use

=now()

as the expression. Next format the text box as you like and you’re done.
However, I hit a sang on the page x of y. SSRS was giving me an error with it’s built in field:

Globals!OverallTotalPages

After a bit of searching, I found that you have to use

Globals!TotalPages

instead of OverallTotalPages. Your text box expression will look like this:

="Page " & Globals!PageNumber & " of " & Globals!TotalPages

Now, your SSRS page footer is complete!


5 responses to “Display a Page Count in SSRS”

  1. I have a report that has a page footer containing two text boxes. Each text box has an expression to print some fixed format text at the bottom of the report. However, when I export to Excel, the text is missing. What do I need to do to get this to export correctly?

Leave a Reply

Your email address will not be published. Required fields are marked *