SSRS 2008 Pagination

4/18/2010 6:30:28 PM

One of the useful things you can do in SSRS 2008 is pagination. This is useful if you are creating a PDF report for your client and 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