1 2 Previous Next 28 Replies Latest reply on Jan 24, 2017 2:03 PM by LoriE

    Numbering report pages

    LoriE

      I have created a minutes of the meeting report pdf. It is comprised of the result of two layouts.

       

      1 Cover page

      2 Minutes report

       

      I have a button that creates the cover page and saves as pdf to a folder on my computer.

      Then I go back select the button for the report which goes to the folder where my cover page is and appends that pdf.

       

      I have adobe acrobat xi pro so I can go in and add pages to the document once all appended has been saved.

       

      My question is can I somehow save and append within fmp, add page 1 of / n and save as pdf to my folder from there?

       

      I am trying to think of a way to simplify this task.

        • 1. Re: Numbering report pages
          philmodjunk

          You can certainly number the pages of a PDF produced by FileMaker.

           

          While in Layout mode, you can use the Insert menu to insert a layout text object for the page number.

          When saving as PDF, you can specify an option, "number pages starting from", to set the second PDF to start from page 2.

           

          To get the total number of pages is a bit trickier. The basic method works like this:

          Pull up the report you are about to print or save as PDF in Preview Mode.

          Use Go to Record/Request/Page [Last] to go to the last page of the previewed report.

          use Get ( PageNumber ) to get the total number of pages in the report

          Set either a global field or a global $$variable to this value. This field or variable must be placed on your layout to show the total number of pages.

           

          And in your case, you'd add one to that value to account for the initial page of your PDF.

          • 2. Re: Numbering report pages
            LoriE

            Thank you, I will give this a try…….it is all coming together very nicely. Maybe next year I can take the certification test…..

            • 3. Re: Numbering report pages
              LoriE

              Okay, so I see the option in pdf to start page number with 2.   Will I be able to add this into the script that I have for this report?

              • 4. Re: Numbering report pages
                BruceRobertson

                Have you looked at the options for this script step?

                • 5. Re: Numbering report pages
                  LoriE

                  I am try to get words into a reply as we speak…. Want it to be clear

                   

                  Lori

                  • 6. Re: Numbering report pages
                    LoriE

                    Okay

                     

                    1. I have a field called page number....Calculation....Unstored, from Minutes, = page start +Get (page Number)-1

                     

                    On my report layout I have a text box "Pg" then the field above so that it will start numbering the pages from "2"

                     

                    Pg 2 of .......

                     

                    Now I need a field that will count the pages and add 1 for the cover page.

                    • 7. Re: Numbering report pages
                      philmodjunk

                      You don't use a field, you use a script:

                       

                      To get the total number of pages is a bit trickier. The basic method works like this:

                      Pull up the report you are about to print or save as PDF in Preview Mode.

                      Use Go to Record/Request/Page [Last] to go to the last page of the previewed report.

                      use Get ( PageNumber ) to get the total number of pages in the report

                      Set either a global field or a global $$variable to this value. This field or variable must be placed on your layout to show the total number of pages.

                       

                      You can then set a global field or a global variable to this value.

                      • 8. Re: Numbering report pages
                        LoriE

                        Lol… okay

                         

                        So I have         -Enter preview mode

                                                -Go to record/request Last

                         

                        This is where I get stuck and then interrupted at work

                         

                        The Get(Page number) is a calculation field

                         

                        How do I incorporate that into a script

                         

                        Sorry, I am not able to focus fully at the moment so I keep losing the vision in my mind as to how this pieces together…

                        • 9. Re: Numbering report pages
                          philmodjunk

                          But Get ( PageNumber ) is NOT a calculation field. It's a function--one that can be used with either set field or set variable to capture the value for use in your report.

                           

                          Set Variable [ $$TotalPages ; Value: Get ( PageNumber ) + 1 ]

                           

                          You can then place:

                           

                          <<$$TotalPages>>

                           

                          on your layout to show the total number of pages in your report.

                          • 10. Re: Numbering report pages
                            LoriE

                            Phil wrote:

                            You can then set a global field or a global variable to this value.

                             

                            Phil I guess this is the part I am having a problem with setting a field to this value as your statement suggests.

                            • 11. Re: Numbering report pages
                              LoriE

                              Oooohhhhhhh got it!

                               

                              OMG it really is a monday

                              • 12. Re: Numbering report pages
                                LoriE

                                Here is my script:

                                Capture.JPG

                                 

                                 

                                 

                                 

                                And here is what I get:

                                Capture.JPG

                                 

                                 

                                 

                                The field that the 9 appears in is a calculation field to start the page with "2"

                                • 13. Re: Numbering report pages
                                  philmodjunk

                                  The extra brackets in your set field step indicate that you've specified a repetition number instead of a calculated result.

                                  • 14. Re: Numbering report pages
                                    LoriE

                                    I did it....I mean we all did it!....YES....thank you

                                    1 2 Previous Next