Hi everyone, I'm struggling trying to find why my delivery note only prints one page when I put value 2 or 3 in my request page. I'm using the copy loop triggers as i saw in documentation.
So below there's a image of my problem where in my report print I only have one page, when it was supposed to have 2 or 3 understand?
So I need to have in my document 3 pages that are the same, but one is the original, the second is double and third page is triplicated.
Code:
OnInitReport()
NoOfCopies := 1;
LactCopyText := SIH_Original;
CopyLoop - OnPreDataItem()
NoOfLoops := 1 + ABS(NoOfCopies);
CopyText := '';
SETRANGE(Number,1,NoOfLoops);
OutputNo := 1;
CopyLoop - OnAfterGetRecord()
IF Number > 1 THEN BEGIN
CopyText := Text001;
OutputNo += 1;
END;
IF LactCopyText <> '' THEN BEGIN
TextOrig2Via := SIH_Original;
END;
MESSAGE('%1',NoOfCopies); //here it prints 2
IF Number = 1 THEN
IF LactCopyText <> '' THEN
TextOrig2Via := LactCopyText
ELSE
TextOrig2Via := SIH_Original;
IF Number = 2 THEN
TextOrig2Via := SIH_Duplicated;
IF Number = 3 THEN
TextOrig2Via := SIH_Triplicated;
IF Number > 3 THEN
TextOrig2Via := SIH_Copy;
CurrReport.PAGENO := 1;
TotalQty := 0; // Item Tracking
HeaderGroup := 1;
LineNumber := 0;
CopyLoop - OnPostDataItem()
So what I'm missing?
Answers
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Show a printscreen from the Dataset Designer.
Is the CopyLoop data item indented?