Hi
I have written the below code on G/L Entry pre data item but Opening is not calculated correct.
GLEntry0 is Record Type in C/Al Globals. GLAccountNo is of Code DataType. GLEntry0.RESET; GLEntry0.SETFILTER("G/L Account No.",'%1',GLAccountNo); GLEntry0.SETFILTER("Posting Date",'%1..%2',0D,StartDate-1); IF GLEntry0.FINDFIRST THEN REPEAT Amt1 += GLEntry0.Amount; UNTIL GLEntry0.NEXT=0; When i write this line then it works fine. GLEntry0.COPY("G/L Entry"); GLEntry0.SETFILTER("G/L Account No.",'%1',GLAccountNo); GLEntry0.SETFILTER("Posting Date",'%1..%2',0D,StartDate-1);
Thanks
*This post is locked for comments