I copied this code from another report for the copy loop. But I don’t understand why its not working. it only prints one page and the other page is just the header with out any information. I have been going crazy trying to figure this out, any help will be appreciated.
I created a data item of integer and in that trigger i put this code.
NoCopies:=3;
NoLoops := 1 + ABS(NoCopies);
IF NoLoops <= 0 THEN
NoLoops := 1;
CopyNo := 0;
CopyLoop - OnAfterGetRecord()
CurrReport.PAGENO := 1;
IF CopyNo = NoLoops THEN BEGIN
IF NOT CurrReport.PREVIEW THEN
PurchasePrinted.RUN(“Purchase Header”); /////// what is this line doing?
CurrReport.BREAK;
END ELSE
CopyNo := CopyNo + 1;
IF CopyNo = 1 THEN // Original
CLEAR(CopyTxt)
ELSE
CopyTxt := Text000;