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”
Thank you! Really helpful.
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?
Mitch, take a look at this page: http://stackoverflow.com/questions/1062199/report-footer-is-not-exported-to-excel
The footers are there, but you need to switch excel from Normal to Page Layout under the View menu. Also, you can see the headers and footers when you use Print Preview. Hope that helps!
Thanks Sir Ji
Ace! Very cool tip. Thank you!