2 Replies Latest reply on Sep 15, 2011 1:14 PM by lbellino

    Page Numbers



      Page Numbers


      I am using FMP 9.  Is there a way to show (printed on each page) how many pages there are in a report?  In EXCEL, you can show "Page 1 of 25" on each page.  Is it possible to do that in FMP?  I have looked in all three of my FMP handbooks, but I've only found how to add a page number. 

      Thanks in advance!

        • 1. Re: Page Numbers

          Suprisingly, the only way I know to do this is with a global field and a script that previews your report and then counts the pages:

          Define a global field for the total pages, gTotalPages.

          Place this field in your layout where you want to see this number.

          Your script:

          #modify this script to first perform any find and/or sort needed to set up the report
          Enter Preview Mode[]
          Go To Record/Page/Request [last]
          Set Field [YourTable::gTotalPages ; Get ( PageNumber ) ]
          #Now you can print or pause the script while still in preview mode to give the user the option to print, save as PDF or return to browse mode

          • 2. Re: Page Numbers

            I tried the script noted above because I'm trying to add page numbers to a layout and I got it to work, even though I set it to start at the first page, instead of last. But I've tried it either way and it still doesn't show the page number in Preview mode, if it's supposed to. So how do I fix this and does this script automatically run when I do print the records from the layout where I placed this field?