Page X of Y

Can somebody please help how to print the Total Number of Pages on a report.

Not that easy Marco Navision generates the page numbers as it prints it does no pre proccesing. If you know the number of lines in the body section for the first page and then the second page you could use the record COUNT. IE: if there are 15 Body Lines and 50 records, with the same Sections on all Pages. OnPreDateItem() LinesPerPage:=15; NoOfPages:=ROUND(Rec.Count/LinesPerPage,1,’>’); Footer,Header or Transaction Section Page Field SourceExpression=STRSUBSTNO(‘Page %1 of %2’,PAGENO,NoOfPages) If you are not printing the Header on Each Page then OnPreDateItem() LinesFirstPage:=15 LinesPerPage:=20; // 15 or less records If LinesFirstPage <= Rec.Count then NoOfPages:=1 else NoOfPages:=ROUND((Rec.Count-LinesFirstPage) / LinesPerPage,1,’>’)+1; If you have Group Totals or Condotional section you will have to Calculate the NoOfLines in Code using record variables. Mr David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk Edited by - David Cox on 8/17/00 12:06:53 PM

Another option is to use an ecxternal reporting package, like Crystal Reports.

unfortunetly, sometimes we have different total lines

there is an item with 1 line (without description 2)

and there is an item with 2 lines (with description)

is there any default function from navision to get total pages?

because i’m using transfooter , so it would be generate automatically to go to the next page