Saving printing preferences in FileMaker

Saving printing preferences in FileMaker

We often face the challenge of printing to different printers with specific options for different print jobs. For example, an Sales Order need to be printed to the default printer with default options, labels need to be printed to a dedicated label printer with a very specific set of options.

It can be tricky to set this up. Practically, there are two tools on your belt, the Print Setup and the Print script steps. The way they work and more specifically store your printing preferences leads to a lot of confusion. Yes, I can speak from my personal experience!

If you read the documentation on those script steps, the description of how they work actually quite accurate but a bit cryptic as well. So, this is what I learned:

  • Print Setup: This script step does not store a specific printer, but rather Printing preferences (Tray, paper format, …)
  • Print: This script step does store the specific printer and the option to print the current record only or the found set. It does not store printing options, even if you open this script step and go to the options to specify them. Read this carefully: do not rely on stored printing options within this script step, they are reset to last known of default options

So, in order to print on a specific printer with a specific set of options (or Preset), you have to use both script steps. Open the Print Setup script step, select the printer and select the printing options. Then, insert a Print script step and select the printer again. Close the script step and save the script. Now, you are all set!

You may ask yourself what ‘storing’ a printer or printing options actually means or when that storing happens. Well, the settings are saved only when you edit the very script steps themselves and change settings, after which you save the script. Be careful with this: if another developer edits one of these steps, and the stored printer is not available on her or his machine, another available printer (or set of options) will be selected and settings will be overridden. This is not what you want. On the other hand, if that same developer does open the script, modifies other script steps (e.g. adds some business logic) and saves the script, nothing is changed to the print setup and printer options.

Well, I hope this clarifies a bit of the mystery. Info on both script steps are to be found on the online help pages:

https://www.filemaker.com/help/15/fmp/en/#page/FMP_Help%2Fprint-setup.html

https://www.filemaker.com/help/15/fmp/en/#page/FMP_Help%2Fprint.html

Jeroen Aarts