Thursday, March 18, 2010

Save to PDF in Filemaker Runtimes? - Yes

I needed to export a report to PDF in one of our runtime solutions.

As we all know, it's not possible in FileMaker as PDF export script steps won't run in runtime solutions.

But I created a little workaround I'd like to share.

So what you need:

A global container field.

That's all.

1) When you do the report - enter preview mode on the report layout(be sure to set the page setup, etc).
2) Copy script step - Copy script step in preview mode copies the report to the clipboard(screenshot like)
3) Enter browse mode - go to the layout where you have that global field
4) Paste the clipboard to that global container field
5) Export field contents (the global container field).

Hey, there you have the pdf file from the runtime! Cool?

Note: It's basically for one page reports, but you can create a screen shot of every page of the report to a different container field (go to record-next in preview) and export those too.

I attached a sample file, which you can download here. You can create a runtime solution from it using FileMaker Pro Advanced.



Please visit our site, http://crm.fm which has our main FileMaker product, and support us by buying it. Thanks!

The material on this document is offered as is. There is no representation or warranty, expressed or implied, nor does any other contributor to this post. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

3 comments:

  1. You forgot to mention that this solution is MAC only and not working for Windows runtimes.
    On Windows FileMaker is generating a bitmap picture file NOT a PDF.

    ReplyDelete
  2. On Windows, it generates a WMF file, which you can convert to PDF with external tools...

    ReplyDelete
  3. Very helpful suggestions that help in the optimizing website. Thank you for valuable suggestions.FileMaker Pro Advanced

    ReplyDelete