Hi
I have added 1 field on Request Page for selecting G/L account . When i give single Account it works fine. In Range it does not work
G/L Account - OnPreDataItem() "G/L Account".SETRANGE("G/L Account"."No.",GLAccountNo); G/L Account - OnAfterGetRecord() OpgBalance := 0; Balance := 0; G/L Account - OnPostDataItem() G/L Entry - OnPreDataItem() SETRANGE("Posting Date", 0D, ToDate); G/L Entry - OnAfterGetRecord() IF "G/L Entry"."Posting Date" < FrDate THEN BEGIN OpgBalance += "G/L Entry".Amount; Balance += "G/L Entry".Amount; END; IF "G/L Entry"."Posting Date" < FrDate THEN CurrReport.SKIP ELSE Balance += "G/L Entry".Amount;
Thanks
*This post is locked for comments
Check this link for better understanding of setrange and setfilter
Hi
Why Setfilter , not SetRange
Thanks
G/L Account - OnPreDataItem() "G/L Account".SETRANGE("G/L Account"."No.",GLAccountNo);
It has to be changed to
G/L Account - OnPreDataItem()
"G/L Account".SETFILTER("G/L Account"."No.",GLAccountNo);
Sohail Ahmed
2
mmv
2
Amol Salvi
2