5 Replies Latest reply on Jan 25, 2010 6:54 PM by deltatango

    save as PDF wonky



      save as PDF wonky


      I have a table that has 4 layouts (ways) of showing the data, depending on the type of record.


      I created a script that goes through each record and depending on the type of record, switches the layout and then appends THAT page to the pdf.


      What you end up with is a multiple page pdf file, but a different layout for each page of the PDF.


      The problem is filemaker always appends the FIRST record of the found group to the pdf file, even though I have gotonextrecord script step in the loop. It is maddening. I don't have a bloody clue what could be wrong. When I go through the script with the script debugger, step by step (which I have done about 20 times now) I can see the script change the record number (go to next record), switch the layout based on record type, append the current record to the pdf and continue. But when I open the PDF file, it's all the first record.


      Has anyone else had this problem? 

        • 1. Re: save as PDF wonky

          As a note, I found an alternative which worked - omitting the previous record after saving to PDF instead of using gotonextrecord step. Then I just exit loop if foundcount = 0 

          • 2. Re: save as PDF wonky

            Which option are you selecting with your PDF?


            Current Record or Records being Browsed?

            • 3. Re: save as PDF wonky
                 Current record. I can't choose records being browsed because each record has needs different layout.
              • 4. Re: save as PDF wonky



                Thank you for your posts.


                From your description, I have been unable to replicate the problem.  This is what I have done:


                1. I created a table with four text fields:

                First Name

                Last Name




                2. I entered four records with information in every field.


                3. I created four layouts,  The first with one field, the second with two fields, the third with three fields, and the fourth with all four fields.


                4. I created a crude script as follows:


                Go to Record/Request Page [ First ]


                   If [ Get ( RecordNumber ) = 1 ] 

                      Go to Layout [ "one" ]

                   Else If [ Get ( RecordNumber ) = 2 ]

                      Go to Layout [ "two" ]

                   Else If [ Get ( RecordNumber ) = 3 ]

                      Go to Layout [ "three" ]


                      Go to Layout [ "four" ]

                   End If

                   Save Records As PDF [ Restore ; Append ; No dialog ; "test.pdf" ; Current record ]

                   Go to Record/Request/Page [ Next ; Exit after last ]

                End Loop





                My PDF file shows the first record with one field on the first page, the second record with two fields on the second page, the third record with three fields on the third page, and the fourth record with four fields on the fourth (and last) page.


                Please let me know what I'm doing differently than you, and I'll try to replicate the problem here.



                FileMaker, Inc. 

                • 5. Re: save as PDF wonky
                     TSGal, the bug stopped when I upgraded to 10.0