in

Dynamics User Group

Since 1995 - The Microsoft Dynamics Online User Community

Page X of Y

Last post 01-30-2008 4:11 by stan. 3 replies.
Page 1 of 1 (4 items)
Write a New Post Sort Posts: Previous Next
  • 08-17-2000 10:20

    • Marco Bakker
    • Not Ranked
    • Joined on 08-17-2000
    • Netherlands
    • Posts 1
    • Points 35

    Page X of Y

    Can somebody please help how to print the Total Number of Pages on a report.
    • Post Points: 35
  • 08-17-2000 12:05 In reply to

    • David Cox
    • Top 50 Contributor
      Male
    • Joined on 09-10-1999
    • Kent United Kingdom
    • Posts 425
    • Points 3,480

    Re: Page X of Y

    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
    mailto: David.Cox@adeptris.com

    http://www.adeptris.com Find Free Development Tutorials to Download
    • Post Points: 20
  • 08-17-2000 15:17 In reply to

    Re: Page X of Y

    Another option is to use an ecxternal reporting package, like Crystal Reports.
    • Post Points: 5
  • 01-30-2008 4:11 In reply to

    • stan
    • Top 50 Contributor
      Male
    • Joined on 01-21-2007
    • Kelapa Gading
    • Posts 384
    • Points 7,400

    Re: Page X of Y

    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 

    The True Test Of Man's Character Is What He Does When No One Is Watching....
    • Post Points: 5
Page 1 of 1 (4 items)


Copyright Dynamics User Group, 1995-2008, all rights reserved. This website and user group are independent and not affiliated with the Microsoft Corporation.