Did you ever find out how to do this?
I cant understand why you want to save a pdf from a database that has all the data to re-create the report when needed... I would just keep a record with the details to recreate the report when needed. Report number report date report period etc
I cant understand why you want to save a pdf from a database that has all the data to re-create the report when needed.
[…] to […] distribute several periodic reports to our club members.
Why program talking bots? That's why …
You're on the right track. You can save a PDF without having to "hard-code" a path to any one of the paths available via the Get command such as Get( TemporaryPath ), Get( DocumentsPath), etc. If you have multiple different print jobs that you need to combine into a single PDF you can use FileMaker Pro to append to that PDF. When you're done creating and appending re-import it using the same path technique.
For example if you wanted to save a PDF of the December 2013 report you might set up a path like
Set Variable[ $path ; "file:" & Get( TemporaryPath ) & "December_2013_Report.pdf" ) ]
and then include the $path variable in the Save Records as PDF script step.
The technique you are doing is an excellent way of preserving the state of the data at the time the report was generated.
P.S. - If you want to import the PDF in a way that will allow it to be viewed within FileMaker then make sure that when you import it you use a container field on the layout that is marked as Interactive and use the Import PDF script step to bring it in. Also you'll need to change the path when reading it back in to be "image" instead of "file"
Set Variable[ $path ; "image:" & Get( TemporaryPath ) & "December_2013_Report.pdf" ) ]
For Michael: I have to be able to prove to our auditors that my reports were done on certain days and that the data wasn't changed. It's a bit burdensome, but keeps everyone happy. JEDtech was spot-on when he mentioned "preserving the state of the data at the time the report was generated".
For cognitionsys: Finally got it working - my last major hurdle was changing from file to image when bringing the report back into FM. Thanks for the interest!