Page total in NAV

lockwclockwc Member Posts: 8
Anybody tried creating page totals for reports in NAV?

Example 1/xx, 2/xx etc

Understand it is difficult to do that in NAV but any one did it successfully?

Advice required and appreciated.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • lockwclockwc Member Posts: 8
    kriki wrote:

    Thanks - saw the replies posted from people downloaded.

    Useable for simple reports but not for documents like invoice etc.

    a case for Un-solvable Nav stories,

    Rgds
  • krikikriki Member, Moderator Posts: 9,110
    lockwc wrote:
    Useable for simple reports but not for documents like invoice etc.
    It is possible to do it for invoices, but you have to control all. You have to define how many lines per page, then read all lines, divide them between pages in a temptable and when you have done all, you can print from that temptable, but you have to control the pageskips, ...

    Like in the old times when printerdrivers didn't exist.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • themavethemave Member Posts: 1,058
    In reading your post I thought of trying this, and it seems to work.

    I have a payroll report I do, and I could use page totals for wages.

    I just created a variable for pgtotal and pgtotaltoshow.


    Employee, TransFooter (2) - OnPreSection()
    pgtotaltoshow := EarningsAmount - pgtotal

    Employee, TransFooter (2) - OnPostSection()
    pgtotal := pgtotal + pgtotaltoshow


    EarningsAmount is the group total for the wage

    Then I put the variable pgtotal in the transfooter

    and the report prints correctly, every page prints the total of the wages on that page. Is this what you are trying to accomplish. Or am I reading it wrong ?
  • ara3nara3n Member Posts: 9,256
    Hello you can also call the report recursively and get the total pages.
    You can use that for complicated reports like invoices.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bennie_de_beerbennie_de_beer Member Posts: 43
    Hi, Can you please give more information on how to run a report 'recursively'?

    Your help is much appreciated.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Either I am misunderstanding something or you are overcomplicating it but page totals for f.e. invoices should be dead simple.

    On Sales Invoice Line - OnAfterGetRecord you say LineAmtTotal += "Line Amount"; and show this variable in the TransFooter.

    If you need a strictly page total i.e. not a running total but only the total of records on that page and not the previous pages, then CLEAR this variable in a TransHeader - OnPreSection
Sign In or Register to comment.