3 Replies Latest reply on Jan 9, 2014 11:10 AM by philmodjunk

    Continuous Page numbering across Layouts

    jwshelton22

      Title

      Continuous Page numbering across Layouts

      Post

           We are using FM12 Adv.

           We are generating a report to PDF. The PDF is about 9 different layouts. I need the page numbering to be continuous. Not restart for each layout.

           Not sure how to go about this.

            

           thanks,

           Jim

        • 1. Re: Continuous Page numbering across Layouts
          philmodjunk

               By previewing the report and using global fields, you can compute a page number with global fields providing the "offset" need.

               Here's an outline of how to do this with two layouts. You should be able to generalize the method to your 9 layout report:

               Define a global number field: gPageOffset

               In the table for Layout #2, define a calculation field as: $$PageOffset + Get ( PageNumber ). Put this field on Layout #2 to use as the page number.

               Then set up a script to put a value into the global field:

               Go to Layout 1
               Perform any find, sort etc needed to set up the layout 1 report
               Enter Preview mode (clear the pause check box)
               Go to Record/Request/Page [Last]
               Set Variable [$$PageOffset ; value: Get ( PageNumber ) ]

               Now you are ready to generate your two layout report with correctly continuous page numbering.

                

          • 2. Re: Continuous Page numbering across Layouts
            jwshelton22

                 Thanks for the process.

                 I have attached jpg of my test script.

                 There is only one table and one record. All the layouts make organization easier, as most layouts are to the max length wise.

                 I was going to attach my test file, but not sure how.

                  

                 thanks,

                 Jim

            • 3. Re: Continuous Page numbering across Layouts
              philmodjunk

                   You have an extra go to layout ["Two"]

                   and you are counting the pages for layout three but never count the pages for layout two

                   And the second time you count page numbers, you need to add them to the previous count:

                   Set Variable [$$PageOffset ; value: $$PageOffSet + Get ( PageNumber ) ]

                   Finally, your Go to Layout steps would be better set up if they looked like this:

                   Go to Layout ["LayoutNameHere" (TableOccurrenceNameHere) ]

                   If you use the "layout name by calculation" option like you have here, a future change to the name of the layout breaks your script where the other version of Go to Layout will still work.