hi, i am facing issue i have created mutiple copies of purchase order reportdata item are purchase header ,purchase line ,integer table for multiple copies
in purchase header on aftergetrecord i have added code for comments to display on rep as
i:=0;
PurchCmmntLine.RESET;
PurchCmmntLine.SETRANGE(PurchCmmntLine."Document Type","Purchase Header"."Document Type");
PurchCmmntLine.SETRANGE(PurchCmmntLine."No.","Purchase Header"."No.");
IF PurchCmmntLine.FINDFIRST THEN
REPEAT
i +=1;
POComments[i]+=PurchCmmntLine.Comment;
UNTIL PurchCmmntLine.NEXT=0;
it gives me output as comment as
first copy
comment1
seccond copy
comment1comment1
third copy
comment1comment1comment1comment1
what i expect as
first copy
comment1
seccond copy
comment1
third copy
comment1
any solution experts thanks in advance
Answers
if you want to use repeat until, you cannot use findfirst, because findfirst only return one data, so use findset for repeat until,
in your report, what do you use to prints comment ? textbox or table ?