Skip to main content

RTC Report Page Number - Format x/y

Hi all,

Let see how can we achieve Page Number in RTC Reports as Current Page/Total Pages in RTC Reports.

Design any of the standard reports I used purchase invoice, and go to RTC Layout of the report From View - layout.

I have added a new text box in the report Header, then i went to expression by right-clicking on the text box.




I Added this in expression: =Globals!PageNumber & "/" & Globals!TotalPages.



As you can see, these "constants" can be found under "Globals" in your Expression-window.

Then I saved the layout and try to execute the report in Role Tailored Client.



yes we have achieved the page number is the desired format.

Thanks & Regards,
Saurav Dhyani

www.sauravdhyani.com

Comments

  1. And now try to print two copies of this purchase invoice.

    ReplyDelete
  2. @ anonymus - for printing two copies, i agree that this will not work it will require a group number variable. If you want that i can post the same too.

    ReplyDelete
  3. In my solution I used the original GroupPageNumber function and inserted a new GroupTotalPageNumber function and it worked. If you have a simpler solution, let me know.

    ReplyDelete
  4. @anonymus - yes that is right, and thank you for sharing the same.

    ReplyDelete
  5. You're welcome. This is a major issue, that ever was a problem in classic NAV. And now it can be solved.

    ReplyDelete
  6. Please can you share the code of the new function.
    Thank you

    ReplyDelete
  7. what do you want to pay for??? no, i'm just kidding.
    Here it is:

    REM Reset Page Number:

    Shared offset as Integer
    Shared newPage as Object
    Shared currentgroup1 as Object
    Shared currentgroup2 as Object
    Shared currentgroup3 as Object
    Shared NoOfLoops 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

    Public Function GetGroupTotalPageNumber(NoOfLoopsReportItem as integer, Totalpagenumber as Integer) as Object
    If NoOfLoopsReportItem <> 0
    NoOfLoops = NoOfLoopsReportItem
    End If
    Return Totalpagenumber / NoOfLoops
    End Function

    ReplyDelete
    Replies
    1. Really Thank you.
      If Possible please post comments with your name.

      Thanks & regards,
      Saurav Dhyani

      Delete
    2. Ok, how about using this report to print more than 1 invoice document and still being able to display Page X of Y for each of the documents?

      Delete
    3. Thats a good point. I think the easiest solution is to run the report for each invoice(or any other Document) separately.

      Delete
  8. you're welcome.

    ReplyDelete
  9. hi sir
    i want know about grouping in Report Navision 2013.

    ReplyDelete
    Replies
    1. Hi Ganesh,

      What exactly is the query. What u want to know abt grouping.

      The grouping concept is same that of NAV 2009 SP1 or 2009 R2.

      Regards,
      Saurav Dhyani

      Delete

Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing -