JeffStone
asked on
Restart page numbering within list
I have a list and inside the list is a number of subreports. Is there a way to restart numbering at the start of each new list item / subreport grouping?
check out the new dense_rank() function in 2005:
http://blogs.techrepublic.com.com/datacenter/?p=277
http://blogs.techrepublic.com.com/datacenter/?p=277
ASKER
I am missing the point of this ... please explain further.
ASKER
ok, I have found something else in further googling ...
a) if I set a hidden textbox in the list with the grouping field named HiddenStoreID
b) and then I can put this in the code page
Shared gPageNo as Integer = 0
Shared gCurStore as String = "00000"
Shared gFirstCall as Integer = 0
Function IncPage(ByVal CurStore as String) as Integer
If gFirstCall = 0 Then
gFirstCall = 1
gPageNo = -1
Else
If CurStore = gCurStore Then
gPageNo = gPageNo + 1
Else
gCurStore = CurStore
gPageNo = 1
End if
End If
Return gPageNo
End Function
c) put this in the footer of the wrapper report
="Page: " & Code.IncPage(First(ReportI tems!Hidde nStoreID.V alue))
This works good except for the first report when exporting to PDF where the initial page number is wrong. Anyone have any thoughts.
a) if I set a hidden textbox in the list with the grouping field named HiddenStoreID
b) and then I can put this in the code page
Shared gPageNo as Integer = 0
Shared gCurStore as String = "00000"
Shared gFirstCall as Integer = 0
Function IncPage(ByVal CurStore as String) as Integer
If gFirstCall = 0 Then
gFirstCall = 1
gPageNo = -1
Else
If CurStore = gCurStore Then
gPageNo = gPageNo + 1
Else
gCurStore = CurStore
gPageNo = 1
End if
End If
Return gPageNo
End Function
c) put this in the footer of the wrapper report
="Page: " & Code.IncPage(First(ReportI
This works good except for the first report when exporting to PDF where the initial page number is wrong. Anyone have any thoughts.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER