Page number in RTC for multiple records.

krithikakrithika Member Posts: 56
edited 2012-03-22 in NAV Three Tier
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.

Comments

  • BeliasBelias Member Posts: 2,998
    google is your friend: search "reset page numbers rdlc nav"
    you'll get this one as the first result
    http://msdn.microsoft.com/en-us/library/dd354982.aspx
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • lakshanvindanalakshanvindana Member Posts: 79
    you can find this in standard report
    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)
    Lakshan Kulawansa
    ERP Consultant - MS Dynamics NAV
    https://lk.linkedin.com/pub/lakshan-vindana-kulawansa/37/2a2/592
Sign In or Register to comment.