6 Replies Latest reply on Mar 5, 2010 12:51 PM by user7962

    Save Records As PDF intermittent file access error

    tcgregg

      Title

      Save Records As PDF intermittent file access error

      Post

      I have a script that produces a report from a layout and saves it as a PDF file using the Save Records As PDF. The script saves it to the same pdf file (test.dpf) everytime for viewing in the web viewer, Next the script goes to another layout with a webviewer to display the pdf report file.

       This works great about 70% of the time the other 30% it returns a file access error and you either have to delete the test.pdf file or go into layout mode and rerun the script.

      Any ideas

        • 1. Re: Save Records As PDF intermittent file access error
          TSGal

          tcgregg:

           

          Thank you for your post.

           

          What version of FileMaker Pro are you using?  What platform are you using?  What is the version of the operating system?  Is this being run from a local drive, or is the file being hosted on a server running FileMaker Pro or FileMaker Server?  30% failure rate is definitely excessive, so anything you can tell me about the PDF file would be appreciated.  That is, what kind of information is being saved, approximate file size, etc.

           

          TSGal

          FileMaker, Inc. 

           

           

          • 2. Re: Save Records As PDF intermittent file access error
            davidanders
              

            Is it possible that someone has the PDF file open?

            This would probably cause such an error. 

            • 3. Re: Save Records As PDF intermittent file access error
              tcgregg
                

              I am using Filemaker 10 advanced V 10.0v3, Windows XP professional, version 2002 sp3, hosted on the local C: drive, it is a pdf file 127kb produced by Adobe PDF Library 8.0, PDF Version 1.4(Acrobat 5.x), 8.50x11.00 in, Tagged PDF No, 2 Pages, no fast web view. Running Q9400 Quad Core Intel @ 2.66GHz with 4GB ram.

              The other thing I noticed is that it happens much more frequently when it is compiled into a runtime application.

              Thanks 

              Gregg

               

              • 4. Re: Save Records As PDF intermittent file access error
                tcgregg
                  

                the application is the only program running and it is not networked or on a server.

                and the script overwrites the file everytime a report is produced, I am not aware of a close file or close PDF function in filemaker? is there one?

                 

                Thank you Gregg

                • 5. Re: Save Records As PDF intermittent file access error
                  TSGal

                  tcgregg:

                   

                  Thank you for the additional information.

                   

                  The answer provided by "davidanders" was definitely a possibility.  However, you have confirmed this occurs on a local machine with nobody on the network having access to the file, so that removes one possibility.

                   

                  Thinking this might be a problem, I decided to try replicating the problem on my Dell Dimension running Windows XP SP3 and FileMaker Pro 10.0v3.  Unfortunately, all of my testing has come up negative.  In my Web viewer, I have it set for:

                   

                  "file:///" & Get (DesktopPath) & "test.pdf"

                   

                  I go to each record, press a button to create the PDF file to the desktop, switch to a layout with the Web Viewer, and it worked every time with 50 records.  I then created a Runtime solution, and performed the same operation for all 50 records.  I'm not sure what else to try at this point...

                   

                  Do you have access to another Windows computer?  If so, does the same problem occur?  If so, I would like to see the database file so I can try it here.  I have sent you a private message (top of this page - right side - X Messages) with instructions where to send the file.

                   

                  Sorry I can't be of more help at this time.

                   

                  TSGal

                  FileMaker, Inc.

                  • 6. Re: Save Records As PDF intermittent file access error
                    user7962

                    I was having the same issue and have found what I was doing wrong.

                     

                    Set a variable for the path like this:

                    "filewin:"&Get(DesktopPath)&Award Letter::Assignment_ID&".pdf"

                     

                    I misunderstood the need to include "Filewin:" as part of my code.

                    Once I did this every thing works.

                     

                    Also note you need to detect platform and use filemac or filewin appropriately.