
32 Answers, 1 is accepted
Currently you can use PageHeader and PageCount global objects only in the PageHeader/Footer Sections as both are available when the report is being rendered, but not earlier.
Can you give us some additional details on "pageCount and PageNumber for each group"? How do you plan to use the page count and number in the group? We may be able to provide you with a workaround of some sort once we understand your requirements.
Best wishes,
Svetoslav
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

Thank you for the additional details. Indeed, our tool does not support this out of the box.
We spent some time to look for similar scenarios with other reporting tools and we came over a blog post that seems closest to your case: http://blogs.msdn.com/chrishays/archive/2006/01/05/ResetPageNumberOnGroup.aspx. We'll highly appreciate if you can take a look at it and confirm that this is what you need.
Greetings,
Svetoslav
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

BTY I am very pleased with this product
Yes, we will add this feature in our ToDo list for the next major version. For your information, we add new features based on the number of requests we get for each. So, the higher the interest in group page numbers, the higher the chances that we may introduce it sooner :)
Feel free to share your further feedback on Telerik Reporting.
Kind regards,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

In this post, you mention that page information is calculated AFTER the page is rendered. I am trying to do the same thing Scott is trying to below. My question is this, if I use the code-behind event to do my grouping of pages, can I display that information on the report? For example:
Say the report is 10 pages with 4 separate groups, I want to print the following on the different pages of the report:
page 1 of 3
page 2 of 3
page 3 of 3
page 1 of 4
page 2 of 4
page 3 of 4
page 4 of 4
page 1 of 1
page 1 of 2
page 2 of 2
Note, there are 10 pages printed, but the page number is displayed by group.
If I can trap the event and decide those values, then all my troubles would be solved.
Thoughts?
Unfortunately such functionality is still not available in our Reporting offering. However we have not given up on the idea and would continue our investigation on the matter.
Regards,
Steve
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

It was mentioned that this would be added to the TODO list on June 28, 2007, so I wanted to follow-up and see if this has been done, and if it is in the current release?
Thanks!
We have not had the time to research and work on this feature. Please check our RoadMaps regularly for what is being worked on and what we might be working on. When this feature makes it in the RoadMap, you would know that we are at least researching on it.
All the best,
Steve
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.


Have you implemented the feature yet? or does it already be included in the current version?
Thanks,
James
As you can verify from the release notes so far, we have not implemented it yet. I've raised the priority of the task, so hopefully we would be able to implement it for subsequent release.
Thank you all for the patience and understanding.
Kind regards,
Steve
the Telerik team

Is this feature implemented in 2011 Q1 release?
Thanks,
Pierluigi
There is no out of the box functionality yet, but one possible way to approach this inquiry is by creating separate report for each group, combine them into a Report Book and utilize the PageNumberingStyle Property to indicate whether the page numbering / count should start from 1 or continue from the last page number / count of the previous report.
All the best,
Steve
the Telerik team

Has this feature been added yet? This would be a real life saver!
Thank you,
Michael
Yes there is now a way to reset the PageNumber per group and you can find more information and sample implementation in the Reset PageNumber per Report Group blog post.
Enjoy!
Regards,
Steve
the Telerik team

Do you know what I may be missing here?
Thank you,
Michael
Really what needs to be implemented is the Telerik.Reporting.Group object needs a property added PagingStyle which could be Continue or Reset.
If it is Continue, then it would function as now, with consecutive page numbering through the entire report.
If it is Reset, then the page number/count would be reset with each new group.
Reporting is painful enough as it is (with ANY tool), ... please make it easier, not harder, I implore you! :)


Thank you for bringing this to our attention.
This behavior is expected since the current code compares the last group on the page with the current group. When you refresh a report with just a single group, or you export it to PDF, the code will always compare the same group to itself i.e. will add up to the current page number.
To avoid this you can pass the current report page number to the user function, so the page number based on the groups can be reset together with the report page number.
We modified the sample report and implemented the above suggestion. Please find the sample report definition in the attached file.
Regards,
Nasko
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Following is the code which rest the pagenumber as per group it. I downloaded modified code also to fix this pdf changing pagenumber issue but it is not clear that how getpage function will be incorporated with existing function. Following is existing code
Public Function MyPageNumber(lastGroupOnPage As String) As Integer
If currentGroup <> lastGroupOnPage Then
ResetPageNumbering(lastGroupOnPage)
Else
NextPageNumber()
End If
Return currentPageNumber
End Function
Private Sub ResetPageNumbering(lastGroupOnPage As String)
currentPageNumber = 1
currentGroup = lastGroupOnPage
End Sub
Private Sub NextPageNumber()
currentPageNumber = currentPageNumber + 1
End Sub
You need to add a check for the actual page number when resetting the page number per group. Here is the whole report code including the modification fixing the issue:
Imports
Telerik.Reporting
Namespace
Telerik.Reporting.Examples.CSharp
''' <summary>
''' Summary description for PageNumberTestReport.
''' </summary>
Public
Partial
Class
ResetPageNumberPerGroup
Inherits
Telerik.Reporting.Report
Public
Sub
New
()
'
' Required for telerik Reporting designer support
'
'
' TODO: Add any constructor code after InitializeComponent call
'
InitializeComponent()
End
Sub
Private
currentPageNumber
As
Integer
Private
currentGroup
As
String
Public
Function
MyPageNumber(lastGroupOnPage
As
String
, reportPageNumber
As Integer
)
As
Integer
If
lastGroupOnPage
Is
Nothing
Then
Return
Me
.currentPageNumber
End
If
If
Me
.currentGroup <> lastGroupOnPage
OrElse
reportPageNumber = 1
Then
Me
.ResetPageNumbering(lastGroupOnPage)
Else
Me
.NextPageNumber()
End
If
Return
Me
.currentPageNumber
End
Function
Private
Sub
ResetPageNumbering(lastGroupOnPage
As
String
)
Me
.currentPageNumber = 1
Me
.currentGroup = lastGroupOnPage
End
Sub
Private
Sub
NextPageNumber()
Me
.currentPageNumber += 1
End
Sub
End
Class
End
Namespace
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

.jpg)
We replied to your question in your support ticket on the same topic. Let's continue the discussion on your specific scenario there.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

(What we're trying to achieve is: each record of the underlying Datasource creates multiple pages of output (actually invoices); sometimes an even number of pages, sometimes odd. If odd, we want to add a pagebreak, so duplex printing of the finished output works w/o the first page of the next record printing on the back of the one before). As we can't access the current PageNumber in group or detail scope, we can't check for it and decide to make a PageBreak. In page scope, we know the PageNumber - but can't perform a PageBreak anymore. The "Reset PageNumber per Report Group" stuff doesn't help here, as this "custom" PageNumber isn't resolved after all the group/detail content is already done.)
You are correct. The total page count cannot be retrieved in the group footer section due to how the report engine is designed and how it works. It is not possible to achieve this and this is described in the Report Structure help article.
You can use the PageCount or PageNumber global objects in a TextBox with expressions such as:
= PageCount
However, this expression will be valid only inside the Page Header/Footer. It is not possible to get it to show up in the Group Footer.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

How to Implement Reset PageCount per Report Group, like extended custom user functions "MyPageCount" ?
we use Telerik Report 2016 R3.
Hello Ted,
I noticed that you have asked the same question in another forum post - Group Page Counter (x of y). You may find my answer there. Let's continue our discussion there.
Regards,
Neli
Progress Telerik

if the group have more records then page number 1 is repeating for group second page also..
means in the 3rd page i have group1 it is printing page numer as :1 it is fine..but next page of same group is showing page number as again 1 .. after showing again 1 next page is showing as 2 it means third page showing page numer as 2 and 4th page showing as page numer :3 like this...
Hello Venkat,
Can you send us the report, so we can check on our end if we can improve the current outcome? Also, maybe you can send us a screenshot of the desired result.
Regards,
Neli
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.