One of the frequent feature requests for Reporting Services was to add the ability to reset page numbers within the report, e.g. based on a change in the group value. Reporting Services 2008 R2 adds this capability through a more general feature to name pages, and define dynamic page breaks and optionally reset page numbers.
The screenshot below shows the result of a slightly modified Product Catalog sample report with overall page numbers, as well as page numbers per product category grouping.
In this posting I show how to build this kind of report step-by-step. All you need to try this yourself is the AdventureWorks2008 sample database (download), and the Product Catalog 2008 sample report (download). Alternatively, you can download the final report from the attachment of this posting (download), and/or read more details about it in the following book on pages 125-127.
Naming of pages in reports is particularly useful for Excel export as well (covered in more detail in an upcoming blog posting). The focus for this blog posting is on page break improvements in Reporting Services 2008 R2 that are very powerful yet could be overlooked in the property grid of groups and report items in Report Builder / Report Designer:
This report also utilizes new additions in the Globals collection in Reporting Services 2008 R2 from RDL expressions in the report. Note that these Global properties can only be referenced from expressions in the page header or page footer:
Steps for modifying the Product Catalog 2008 report to accomplish page numbers per product category.
Done – run the report and enjoy!