I need to print out a report with only 2 items per page. Presently the report just prints items sequentially so half of one item can be printed on one page and the other half on the next page.
Problem is I dont know where to start to put a Counter that counts the number of items that have been printed and to initiate a page break if the Counter exceeds 2. In which section should I place the code - OnPreSection in Item Body or Header or Footer ??
I have tried reading through smart books on how to create reports but no luck in understanding how to solve this particular problem so far....
Thanks in advance O:)
0
Comments
Something like this:
counter += 1;
IF counter = 2 THEN
BEGIN
CurrReport.NEWPAGE;
counter := 0;
END;
no? #-o
On the Check Report 1401 - It used to print 10 entries MAX before it create a new check. So I set MaxIteration to 25. now it prints 25 lines per page. works fine.
on the dataitem: Integer ->PrintSettledLoop
see the report to get an idea
Maybe this is or isn't what your looking for?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Not sure if MaxIteration is going to do the job here. There could be 2 or 200 items to output, but specifying MaxIteration=2 will stop the output after the first 2. We just need to make it move to the next page after each block of 2.
Have you managed to fix this one yet, Scoville?
Thanks guys for your help!
Alanperu, I used your code in the OnAfterGetRecord and instead of checking for a static number I used
IF (Counter mod 2) = 0 THEN CurrReport.NEWPAGE
to check whether the Counter was an even number. It worked !
Now my report prints out 2 items per page, except for Page 1 which only prints 1 item and Page 2 which is completely empty. The other pages are fine.
Am I missing something here or is it my report that is built up wrongly ?
Would appreciate some advice again.
By the way, this forum is in my opinion the best MBS Navision forum on the net. Everyone is helpful and intelligent O:)
If Counter < 5 then begin
if (counter = 2) OR (counter = 4) then
CurrReport.NEWPAGE;
end else
IF (Counter mod 2) = 0 THEN CurrReport.NEWPAGE
I don't know if this is the *best* solution, but if it works it works.
-a
If Counter < 5 then begin
if (counter = 2) OR (counter = 4) then
CurrReport.NEWPAGE;
end else
IF (Counter mod 2) = 0 THEN CurrReport.NEWPAGE
I don't know if this is the *best* solution, but if it works it works.
-a