all groups > sql server reporting services > march 2006 >
You're in the

sql server reporting services

group:

Reset PageNumber On Group Change


Reset PageNumber On Group Change Rick
3/7/2006 12:00:36 PM
sql server reporting services:
I need to reset the page number when a group changes. The group is controlled
in a list. PageNumber works well for overall numbering, but not inside the
group, furthermore, I cannot access the current pagenumber from inside the
group.

RE: Reset PageNumber On Group Change allison
3/8/2006 6:41:07 AM
Add this to your report code:

Shared offset as Integer
Public Function GrpPN(reset As Boolean, pagenumber As Integer) As Integer
If reset
offset = pagenumber - 1
End if
Return pagenumber - offset
End Function

Then place a text box in the page footer with this expression - assuming you
have the group set with page break at end and have labeled your Group cell.

="Page " & Code.GrpPN(Not(ReportItems!txtGroup.Value Is Nothing),
Globals!PageNumber)

Hope that helps (this was in 2000)
--
Allison


[quoted text, click to view]
AddThis Social Bookmark Button