reports

surisuri Member Posts: 123
hi superiors
i have the following question as shown below.
Report to enter the Account No. in "Consol. Debit Acc." and "Consol. Credit Acc." for all acounts in chart of Accounts
i have taken a new report
with data item
g/l account
property:processing only=yes;
i have written the code
onafter get record()

IF "G/L Account".FIND THEN
BEGIN
REPEAT
"G/L Account".INIT;
"G/L Account"."Account Type":="G/L Account"."Account Type"::Heading;
"G/L Account"."Consol. Debit Acc." :="G/L Account"."No.";
"G/L Account"."Consol. Credit Acc." :="G/L Account"."No.";
"G/L Account".INSERT;

"G/L Account".RESET;
UNTIL "G/L Account".NEXT=0;
END
ELSE
MESSAGE('no records');

it was throwing the error,i was week at coding .can you suggest me the process where i have done wrong
thank you

error:

the g/l account entry already exists
with no :1000

Comments

Sign In or Register to comment.