I am getting page numbers while running RTC report,but my scenario is when i run a report for multiple records,for example if i run PO report for more than one order,i should not get continuous page number instead i should get as : if order A has 3 pages and order B has 2 pages,it should show page number for order as 1 of 3,2 of 3 etc for order A and for oder B as 1 of 2 ...so on.Instead of showing continuous page number for both order together as 1 of 5 ,2 of 5 etc.
how to resolve this.
Thanks in advance.
0
Comments
you'll get this one as the first result
http://msdn.microsoft.com/en-us/library/dd354982.aspx
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
but I have no idea to display total pages ( Page 2 of 3 )
other than that, this is possible, below is my way ( short way )
Step 1; include method in Code
RTC Report Properties - > Code
REM Reset Page Number:
Shared offset as Integer
Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object
If NewPage
offset = pagenumber - 1
End If
Return pagenumber - offset
End Function
Step 2; include NewPage
NewPage needs to return only TRUE, when it is a new page (returns FALSE/nothing, when it is not a new page), so find a place (group) which only appear in a new page ( not repeating every page ), and set textbox properties as below.
Value ; =True
Name ; NewPage
Hidden ; True
Step 3; include Page number textbox in Header/ Footer
RTC Header - Page Number text box
=Code.GetGroupPageNumber(ReportItems!NewPage.Value,Globals!PageNumber)
ERP Consultant - MS Dynamics NAV
https://lk.linkedin.com/pub/lakshan-vindana-kulawansa/37/2a2/592