Pages

Thursday, October 27, 2011

Pagination in Reporting Services



One of the useful things you can do in SSRS 2008 is pagination. Pagination is useful if you want to display the page number in the footer, or other parts of the page.
If you drag a textbox onto the page you can right click in the textbox and click on Expression you can tell SSRS what you want to display in the text box.
Inside the Expression box in the bottom left you will find an area called Category. If you click on "Built-in Fields" you will see some useful things for us. PageNumber and TotalPages are what we are after.
So let's make a string that will display "Page 1 of 2". Where 1 is our current PageNumber and 2 TotalPages.
Simply use the following and you should get the desired result:


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

No comments: