goodmorning to everybody,
i am experiencing a problem with a new custom invoice report for a customer.
i have to print a specific number of sales lines in each page and then to do a page break and continue print in another page.
Until now i put :
1) Sales Invoice Line -OnAfterGetRecord:
IF LinesPrinted >= 20 THEN BEGIN
CurrReport.NEWPAGE;
LinesPrinted := 0;
2) Sales invoice line - OnPostSection
LinesPrinted := LinesPrinted + 1;
3) i create a new section called LinesPrintedLoop and in PostSection i put the following:
WHILE LinesPrinted <= 19 DO BEGIN
CurrReport.SHOWOUTPUT := TRUE;
LinesPrinted := LinesPrinted + 1;
END;
the page break seems to go ok BUT in the second page the header infos does not printed again. (ie the properties of Header section "PrintOnEveryPage=Yes")
](*,) do you have any idea?
0
Comments
A possible solution: put an DataItem indented under the Sales line of type integer. Put a filter so it runs only once. Iin the "OnPreDataItem()" or "OnAfterGetRecord()" you can do something like this: "NotLastSalesLinePrinted()" : in this you have to check if you just printed the last line. In this case it is not necessary to do a NEWPAGE.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
as i understood i will delete all the previous commands!!!
i am new in development and i have been confused.
the "NotLastSalesLinePrinted()" is also an integer:
and the filter you mentioned how i put it the dataItem properties:
:oops: gd
You will be answering others people questions before you know.
As you read before, i am trying to print a specific amount of sales lines in each page of the invoice but goes a quite rong ....
seems that does not work at all
First I need to clarify some things:
Have you made a new invoice or have you created a copy of report 206?
I understand the NEWPAGE thing works, or am I wrong?
So the problem is only the printing of the header on the 2nd and following pages?
I hope I've understand this correctly.
no the NewPage does not work at all ...
and yes the header in the following pages does not be printed
i tried to follow the example of Kriki
in the "Sales Invoice Line" dataitem of a standard 206 invoice it works fine.
Could you please test this also in a non-modified 206 invoice?
I put in the 5 to test with a smaller invoice...
because i have a total footer with a property "place in Bottom"...
when i print 4 sales lines (ie LinesPrinted=5 PageBreak), the footer goes to the second page at the bottom without any header at the top of the 2 page.
there is enough space to be printed in the first page.
Have you tried searching on "NEWPAGE".
There are some topics which discuss your problem.