7 Replies Latest reply on Apr 14, 2012 8:06 AM by johnhorner

    Saving Print Setup and Print Options as User Preference



      Saving Print Setup and Print Options as User Preference


      i recently came across a solution where it allowed the user to specify the page set up and print options for 3 or 4 different printers and record these settings to a preferences table.  to set up the printers, the user was asked to select from a drop down list of available printers and then made settings in the "page setup" dialog and "print" dialog.  presumably, you could then either script "printer 1", for example, as the desired printer without dialog or allow the user to select printer 1, printer, 2, etc. from a drop down list when they went to print.

      so the question is, does anyone know how to implement this in filemaker, or does it require some sort of plugin or other programming?  specifically, assuming it is possible to do natively in filemaker, how do you generate the list of available printer's for the user to select from, and how do you save these settings.

      my goal is to allow the user to set the printer preferences and setup once, and then use them without dialog in other printing scripts.


        • 1. Re: Saving Print Setup and Print Options as User Preference

          The only way I know to get this to work is to set up a lot of little scripts that explicity specfiy a particular printer and set of  print setup options. When the user makes their choices, the data stored in the prferences table determines which "print script" is performed each time a script needs to print without popping up a dialog for the user to use to control the print process.

          • 2. Re: Saving Print Setup and Print Options as User Preference

            thanks phil... i don't mind putting in a little extra work up front and writing the required scripts, but i am confused about what they would be exactly.  would you be able to provide a little more in the way of details.  some specific questions i have:

            1. how do you generate a list of available printers that you can use in a value list for the user to select from?  i noticed that there is a get ( printername ) function but doesn't that just give you the name of the default printer?

            2.  how do you give the user the ability to configure the "setup" and "print" options within a script but then have those steps execute without dialog in the future... and how do you let the user specify the "print" settings without actually printing (don't you have to click "print" to commit the settings or "cancel"?)

            3. how do you make it persist?  i have read several posts (such as Script Print Setup does not save ? FM Pro Advanced 10 v3) that seem to indicate you cannot save more than 1 printer setup because as soon as you specify a second one it replaces the settings for the first... is this not correct?

            please help... thanks!

            • 3. Re: Saving Print Setup and Print Options as User Preference

              1) It wouldn't do you any good if you could. You need specific scripts for specific printers so a Custom dialog or table based value list is needed. (You don't want your value list spontaneously gaining a printer for which you have not created a script.)

              2) You don't. You script a set of options and then your script selects the printer script appropriate for the options the user specifies.

              3) You use separate scripts for each printer setup and printer combination.

              Here's a simplified example:

              One of my solutions can use either dot matrix printer model A, dot matrix printer model B or a plain paper printer such as an ink jet or a laser printer.

              I created three print scripts:

              Print DotMatix Model A. Print Dotmatrix Model B and Print Plain Paper Printer

              I put single print setup and print steps in each script with different options specified by me, not the user.

              In a preferences table, the user can select one of these three printers.

              In any script that needs to make a no dialog print action, I have code like this:

              If [ Globals::SelectedPrinterType = "Dotmatrix A" ]
                 Perform Script [ Print DotMatix Model A ]
              Else If [ Globals::SelectedPrinterType = "Dotmatrix B" ]
                 Perform Script [Print Dotmatrix Model B]
                 Perform Script [Print Plain Paper Printer]
              End IF

              I fully understand that this is not nearly so flexible as what you want, but it's the closest to what you have requested that I can come up with.

              • 4. Re: Saving Print Setup and Print Options as User Preference

                ok... thanks phil.  i appreciate the help.  i was hoping to be able to leave this up to the user...  i can't imagine how they did it... it almost seemed like they were using a script (perhaps not filemkaker though) to create the individual printer scripts because it was doing this based on the list of printers in my network.

                the solution where i saw this ("garage assistant 3") was a winner of some sort of filemaker design award... i forget where i saw it originally.  i will try to contact them to see if they are willing to share their secrets!  thanks again.

                • 5. Re: Saving Print Setup and Print Options as User Preference

                  They probably used a plug in. There's at least one that I've heard of for better management of printing tasks.

                  A humble alternative that I use sometimes is to simply preview the layout and pause the script while still in preview mode. When they continue the script, it returns to browse mode and takes the user back to wherever they need to be layout wise. While paused, the user can access the print set up and printer dialogs for themselves. This makes for a pretty familiar interface as most users already use print from the file menu in countless other  applications, but exposes "records being browsed" and "current record" options--which can lead to confusion in some cases.

                  • 6. Re: Saving Print Setup and Print Options as User Preference

                    thanks phil... i think there are some other places in the solution where your alternative method will be just fine... although for certain invoices and users, a no dialog option would be ideal... still waiting to hear back from the makers of "garage 3"... i will post their answer (assuming i get one) for anyone interested.

                    • 7. Re: Saving Print Setup and Print Options as User Preference

                      just to follow up, i did hear back from the developer of the solution "garage assistant 3" and he was happy to share the fact the he had, indeed, used a plugin to achieve this.  the plugin is called "printer switch" from "myfmbutler".  cheers!