Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to reset the page number back to 1 every time the report gets a group break?

break group page report reset time
0
Posted

How to reset the page number back to 1 every time the report gets a group break?

0

Resetting the page number on group breaks is not natively supported. There is a workaround: you can track group breaks in a shared variable, and reset this variable to 1 when reaches a new group break. Here are the steps: 1. Make sure there’s a textbox in the report which contains the group expression. 2. Add shared variables to track the current group and page offset: Shared offset as Integer Shared currentgroup as Object 3. Add a custom function to set the shared variables and retrieve the group page number: Public Function GetGroupPageNumber(group as Object, pagenumber as Integer) as Object If Not (group = currentgroup) offset = pagenumber – 1 currentgroup = group End If Return pagenumber – offset End Function 4.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123