How can I loop a result dataset to group per Document No.? Let me explain what I'm doing:
I'm currently working to create a report that sums the Debit and Credit of all the General Ledger Entries group by the Docyment No., so far I have been able to group and get the actual SUM of the fields. The problems is that it only takes the first document No.
Here is what I have so far in code:
SETRANGE("Document No.", "G/L Entry"."Document No."); SETRANGE("External Document No.", "G/L Entry"."External Document No."); CALCSUMS("Debit Amount"); CALCSUMS("Credit Amount"); Total_Debit := "Debit Amount"; Total_Credit := "Credit Amount";
This code executes correctly, but it only returns the first document.
Am I missing something?
*This post is locked for comments