Reset page numbers for each group in a report

Sometime you would need to reset page numbering on your Ms Reporting on each group. To do so it's needed to add a few line of code in the sub as sample below:



Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
'Set page number to 1 when a new group starts.
    Page = 1
End Sub
And then Set the ForceNewPage property of the Country Footer section to After Section. To do this, follow these steps:
  1. In Design view, right-click  The Group Footer, and then click Properties.
  2. In the Section: GroupFooter1 dialog box, click the Format tab.
  3. In the Force New Page box, click After Section, and then close the Section: GroupFooter1 dialog box.

See Original post at 841779  Or 209215



Comments

Popular posts from this blog

How to prevent a user from running Task Scheduler in Windows

Reading excel file in asp.net