This is a migrated thread and some comments may be shown as answers.

Group Page Counter (x of y)

5 Answers 1007 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 27 Sep 2016, 05:42 PM

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?

For example:

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"

Thanks! -Eric

5 Answers, 1 is accepted

Sort by
1
Katia
Telerik team
answered on 29 Sep 2016, 12:08 PM
Hello Eric,

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.


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ikbum Kim
Top achievements
Rank 1
answered on 23 Sep 2019, 10:22 AM

Hi,

Isn't there a way to do it in the report designer?

0
Brian
Top achievements
Rank 1
answered on 24 Sep 2019, 07:24 PM

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.

0
Brian
Top achievements
Rank 1
answered on 17 Oct 2019, 02:44 AM

Hello Katia,

  How to Implement Reset PageCount per Report Group, like extended custom user functions "MyPageCount" ?

0
Neli
Telerik team
answered on 21 Oct 2019, 02:53 PM

Hello Ted,

Since R1 2017 (version 11.0.17.118), 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.

Regards,
Neli
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Sam
Top achievements
Rank 1
commented on 28 Dec 2021, 10:02 PM

This comment applies to R3 2021 SP2 (version 15.2.21.1125)

While the PageNumber and PageCount functions are working great in the Page Header/Footer sections, they seem to return blank values when used in a Group Footer section.

My specific need is to be able to determine when a Group Footer section, set to PrintOnEveryPage=True, is occurring on the last page of the group. 

Specifically:  On my Invoice Report, which can be run for multiple invoices, I want the totals for all the line items on a given invoice, to only show up in the footer of the last page for that particular invoice.  NOTE: There is other information in the group footer that is supposed to show up at the bottom of every page and each Invoice can have enough line items on it to require 1 to 100 pages.

If the PageNumber and PageCount functions can't be used to determine if the group footer is occurring on the last page of the group, is there another way?

Neli
Telerik team
commented on 30 Dec 2021, 06:24 AM

Hi Sam,

There is a  feature request for this requirement -  Access the PageNumber from Report/Group header/footer sections. and I have voted for it on your behalf.  In this way, you increase its priority and you will receive a notification when there is update on the status. 

Currently, the page functions are available only in the page sections. For that reason, I am afraid that there is no workaround that I can suggest.

Please, let me know if you have further questions.

Sam
Top achievements
Rank 1
commented on 30 Dec 2021, 02:46 PM

Thanks for the link to the feature request, I'll keep an eye on it.

By "no workaround", do you mean there is currently no way to determine if a group header/footer is occurring on the last page of the group?  (I was really hoping for an alternative I wasn't aware of)

Neli
Telerik team
commented on 04 Jan 2022, 01:18 PM

Hi Sam,

Maybe you can test using a table. When you add the group of the table, please, make sure that you check the Add Footer option. Please, check the attached sample report.

Sam
Top achievements
Rank 1
commented on 04 Jan 2022, 10:00 PM

As far as I know, putting the invoice totals in the detail grid table will cause them to appear immediately after the last line item for that invoice... instead of at the bottom of the page.  Is there some way to force the last row of a detail grid to appear at an arbitrary position on the page?

Neli
Telerik team
commented on 05 Jan 2022, 10:42 AM

Hi Sam,

You may test using the Exec Data function which allows you to execute the specified expression in the given parent data scope. Also, you can consider sending me screenshots of the desired outcome. There might be another approach that we could suggest.

Tags
Report Designer (standalone)
Asked by
Eric
Top achievements
Rank 1
Answers by
Katia
Telerik team
Ikbum Kim
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Neli
Telerik team
Share this question
or