Hi Guys, Kinda new here..
My issue is that i'm trying to calculate and sum all the 'remaining amount' entries in vendorledgerentry based on the start date and vendor no i'm entering in the report request page.
For example if its 11/24/2023 that i'm entering on the request page all the entries before this date's remaining amount should calculate for the particular vndor and display on my report table.
this is my coding and what i have tried so far, would appreciate if anyone could point me in the right direction.
Vendor Ledger Entry - (OnAfterGetRecord)
BforwardRemainingBalance := 0;
VendorLedgerEntry2.SETCURRENTKEY("Posting Date");
VendorLedgerEntry2.SETRANGE("Posting Date",0D,CALCDATE('<-1D>',"Start Date"));
IF VendorLedgerEntry2.FINDSET THEN
REPEAT
VendorLedgerEntry2.CALCFIELDS("Remaining Amount");
BforwardRemainingBalance := BforwardRemainingBalance + VendorLedgerEntry2."Remaining Amount";
UNTIL
VendorLedgerEntry2.NEXT = 0;
message('remaining bf is %1', BforwardRemainingBalance);
i'm getting a different value here which doesn't match with the excel file which i exported and summed with the correct filters, and the time it takes to load the report is too long.
Answers
RIS Plus, LLC