I'm creating an invoice report that sometimes requires a group to continue for multiple pages.
Is there a way within Report Designer to create a group-based page counter?
A report is 30 pages long but is split and page broken by a group.
The page counter for each grouping should display the current page, along with the number of pages for that specific group. Something like "Page 2 of 4"
5 Answers, 1 is accepted
Group-based page numbering is not supported out-of-the-box.
If you use Standalone Designer to create TRDX|TRPD reports the designer needs to be extended with additional logic for resetting the page number per group (check the attached example).
After the Designer is extended to use the external assembly with user function, you can use this function inside the reports to reset the page number per group.
You can also check How to use external assemblies with custom user functions in the Report Designer KB article providing more detailed information on how to extend the Designer.
Telerik by Progress
Isn't there a way to do it in the report designer?
There sure is.
= "Page: " + PageNumber("group1", Fields.salesorderID) + " of " + PageCount("group1", Fields.SalesorderID)
That is the expression that I use in my reports.
So typically you would drop this in the page footer as a text box.
Group1 = what ever the name of your group is that you are grouping the invoice on.
SalesOrderID = this is my transactionID from my database. You will need to change this to suit your database.
Let me know how you make out as it took me a while to figure this one out.
How to Implement Reset PageCount per Report Group, like extended custom user functions "MyPageCount" ?
Since R1 2017 (version 126.96.36.199), we introduced advanced built-in PageNumber and PageCount functions allowing to reset the page number and count on any page based on the data. For more information, refer to Page Functions article.
If you prefer not to upgrade, you can check the sample report provided by Katia which works for the older versions of Telerik Reporting too.