I have developed a report which works on ‘Bank account ledger entry’ and ‘Bank account statement’ tables. Main table is ‘Bank account ledger entry’ and ‘Bank account statement’ is a record variable.
My requirement is after all the filters, it should find the last record ‘Statement date’ and go back by only one record and give me the statement date. I tried with this logic, but its showing me the last record only.
My piece of code,
recBAS.SETRANGE(recBAS.“Bank Account No.”,“Bank Account Ledger Entry”.“Bank Account No.”);
IF recBAS.FIND(’+’) THEN
Count1 := Count1 + 1;
PreStmtDate := recBAS.“Statement Date”;
UNTIL Count1 = 1;
Kindly help with what is wrong in this…
Thanks & regards,