6 Replies Latest reply on Feb 28, 2013 5:52 AM by mikebeargie

    Users changing printers on a network


      I work for a copier company and so printers are changed on an almost weekly basis and causes print problems.

      I cannot allow users to select the printer at the time of print in some scripts because it may be printing invoices in a loop and they will go insane if they have to select for every invoice.


      I have not really got my head around how restore works in spite of having read many posts on many forums. Being on a windows network with some of the printers also being on the network rather than local further complicates things.


      I recently had to go thorugh all my scripts and edit them because a printer had been changed and we wanted to NOT print colour etc


      Would it work if I had 8 scripts that then only these would need to be edited and these would be used instead of Print and I would not need a print setup step.


      I would be so happy to resolve these issues as they have been the bane of my life for years and whilst I am doing a re-write in Filemaker 12 would like to resolve these steps without a plugin



      Print Black portrait current record

      Print Black portrait records being browsed

      Print Black landscape current record

      Print Black landscape records being browsed


      Print Colour portrait current record

      Print Colour portrait records being browsed

      Print Colour landscape current record

      Print Colour landscape records being browsed


      Many thanks




        • 1. Re: Users changing printers on a network



          you can indeed script page setup and print for a specific printer as long as all users have access to the printer, and if it's named the same)


          But you can combine all those things into one script and pass a script parameter.


          IE the button for "Print Single Black Portrait" would pass "SBP" as the script parameter,


          then your print script would look something like:


          If ( Get(ScriptParameter) = "SBP"

               print setup (for single black portrait)


          Else If ( Get(ScriptParameter) = "SBL"

               print setup (for single black landscape)


          Else If (etc...)


          End If


          This would let you control the setup and print step for each of your parameters, and you could change one method or all methods inside of the script for instant re-deployment, as opposed to updating buttons all over the place.


          Good luck!


          • 2. Re: Users changing printers on a network

            My two pence worth.


            I have found that FM has had issues with printing since FM9 was released.  Very often a print script that moves from one layout to another and one printer setup to another will result in a layout being printed the ‘wrong’ shape.  i.e. a landscape report printed on a laserprinter would come out B6 portrait  if immediately prior to printing the report the script had printed a label layout on a labelprinter.  This is particularly the case when the script is being run ‘without dialogue’ and the print setups involve switching paper feed and output trays.  It seems FM remembers the last print setup instruction and does not replace it with the new one.

            Also the general success of setting up print scripts can be affected by what machine the script is programmed on.  I have had several instances where a script works perfectly on the machine the script has been written on but fails when the script is run on a different machine (e.g. the script picks the wrong paper feed tray), even though the platform is the same and the printer drivers identical.  I have had to either use a plugin to resolve these issues (for example FMButler) or to write separate printing scripts for each page setup. The latter example following Mr Beargie’s script:


            If (Get(scriptParameter) = “SBP”
            PerformScript ‘PrintSingleBlackPortrait ‘


            Where the ‘PrintSingleBlackPortrait ‘ script is a standalone script containing the Print Setup and Print script steps for that particular printing operation.  A bit more longwinded but can help solve a problem if you encounter anything like the above.


            I trust this might help.

            • 3. Re: Users changing printers on a network

              Please note:

              To print correctly, the Print script must contain

              - a Page Setup step and

              - a Print step


              See <http://fmdiff.com/fm/printing.html> for more details.




              • 4. Re: Users changing printers on a network

                You can also use plenty of other if statements and get functions to customize this to your user's needs.


                IE Get(acccountName) for directing printing for specific users.

                • 5. Re: Users changing printers on a network

                  Thanks for your help guys the Account name will definitely be useful and I think I have sussed what I need to do - not ideal though is it?

                  • 6. Re: Users changing printers on a network

                    You have an advantage being an in-house developer though in that you know the people, printers and requirements for output. Us contractors though have to figure out all those dynamics in a (usually frustrating for the user) process.