Summary on Gen. Journal

podollypodolly Member Posts: 84
Hi all,

I would like to make a summary on test report of gen. journal, to have a grouped total for every vendor, customer and bank. But when I try to add a new key in gen. journal line table, sort using this key, add a groupfooter section for gen. journal line, the test report will show warnings as the documents are not balanced out due to the re-ordering of the journal lines.

Can anyone suggest another way to achieve this? Thanks in advance.

Answers

  • ara3nara3n Member Posts: 9,256
    comment out the code that checks for balance by document type/ document no, and write your own one using Temporary record to keep track of totals by document no.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • podollypodolly Member Posts: 84
    I am doing this with another approach. But get no idea why the group footer work in that way.

    First of all, in table 81 Gen. Journal Line, I added a new key:
    Journal Template Name,Journal Batch Name,Account Type,Account No.

    Then I create a report with Data Item Gen. Journal Line
    DataItemTableView: SORTING(Journal Template Name,Journal Batch Name,Account Type,Account No.) ORDER(Ascending)
    TotalFields: Amount (LCY)
    GroupTotalFields: Journal Template Name,Journal Batch Name,Account Type,Account No.

    I show only Journal Template Name, Journal Batch Name, Account Type, Account No. and Amount (LCY) in the group footer. Here is the report looks like



    The circled parts are the sum of the above lines. This is the part that I cannot explain and if someone can solve my question. Why the lines with same account type will group once more time, and for bank account, a few times.

    Hope if anyone knows the answer can give a hand. I really get confused to this. Thank you.
  • ara3nara3n Member Posts: 9,256
    GroupTotalFields should be Account Type,Account No.


    You are going to print this from journal so it will print one batch only.


    How many group footer do you have?

    On presection of each groupfooter you need to put code

    CurrReport.showoutput(GroupfieldCausedBy = FieldNo("Account type");

    and
    CurrReport.showoutput(GroupfieldCausedBy = FieldNo("Account No.");
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • podollypodolly Member Posts: 84
    =D> Great thanks ara3n!!!! Finally worked out with this :mrgreen:
  • ara3nara3n Member Posts: 9,256
    you are welcome. :)
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.