Page numbers

after some calculation in report I get out number (for example -18), how many pages i need to print and in each of those pages have the page number from 1 untill - (for example 18).

How to do it?

usually in NAV 2009 SP1, while creating a report the page no & date are present!

And can you be a bit more specific in what you want?

So based on your calculation you will get an integer number(**Example ‘X’).**next you will run a report that report should print only X pages only.

1.My question is where you are doing this calculation ?(It should not be in report section triggers)

writ the below code at the PostSection() trigger of last section of your report

if CurrReport.PAGENO = x then
CurrReport.BREAK;

Thanks

Marshal.J

the calculation is very simple - for example, if in production order "Quantity Producing’ is 100 and this product will be packed on one pallet 20 pcs, then i need 5 pallet lists numbered 1, 2, 3, 4, 5

nobody has any idea?

Let’s take your example

Quantity Producing is 100 pcs and 20 pcs per pallet so do the below steps, for example I have used item table.

a. Create a variable named PagesToPrint wit integer data type

b. Create a variable PageNo1 with integer data type

  1. Item - OnPreDataItem ()trigger

PagesToPrint: = Quantity Producing/20;

  1. Item - OnAfterGetRecord ()

If PageNo1 > PagesToPrint then

CurrReport.BREAK;

  1. Item, Header (1) - OnPreSection ()

PageNo1:= CurrReport.PAGENO

4.The above code will stop printing when the report reaches 6th page

  1. Make sure new page per Pallet is true

  2. PrintOnEvry Page of your Header (1) must true

Jerome Marshal.J

Great!

Only i add ROUND() function, because this calculation sometimes include decimal digits…

PagesToPrint: = ROUND(Quantity Producing/20,1);