I have this code that I used to reset the page numbers based on the grouping value change and it executes as it should.
However, I need to now calculate the total pages per each group and have no idea how to do this. An examp would be page 1 of three for the first group page footer and page 1 of 2 for the second group because the page rendering will be dynamic based on the amount of information returned for each group. Any ideas or help would be greatly appreciated.
Code:
Shared offset as Integer
Shared currentgroup as Object
Public Function GetGroupPageNumber(group as Object, pagenumber as Integer) as Object
If Not (group = currentgroup)
offset = 1
Else
offset = offset + 1
End If
Return offset
End Function
Comment