8 Replies Latest reply on Oct 26, 2012 3:01 PM by jdhelle

    Print Help



      Print Help


           Filemaker Pro 12 - Mac

           The following script creates a simple report and then presents the option to print. The script does display the Mac print options from which I can choose print, cancel, etc.  However, whether I select print or cancel when I return to the "System Tab" (last line in the script) the Mac print options appear again.  This is my first attempt to print using a script.

           Any help will be appreciated.




        • 1. Re: Print Help

               I'd add an exit script step after ths show custom dialog so that you don't try to print if no records are found.

               Use Get ( LastError ) to check for an error code after the print[] step. I believe that clicking cancel will return a nonzero error code here.

               But I don't see anything in your script that would open up the print dialog a second time.

               If you had fileMaker Advanced, I'd suggest enabling the script debugger and stepping through your script to see where/why you get that dialog twice.

          • 2. Re: Print Help

                 I finally have a working script:


            • 3. Re: Print Help

                   Yet your script is unchanged as far as I can tell after several minutes of scrolling back and forth between them. And it still will attempt to print even if no records are found.

                   What did you change?

                   And scripts do not have to have "exit script" as the final step. If you delete that step, your script will still work.

              • 4. Re: Print Help

                     I know, this is really strange to me too!

                     I added the "Set Error Capture [On]" and moved the first "Go to Layout ["Diamond Disc For Sale Report" (Owned_Music-Library) to after the "Enter Find Mode [ ]" and it worked.  

                     Then I decided to add the "Show/Hide Toolbars [Toggle]" and "Pause/Resume Script [Indefinitely] so I could first see the report and decide to print or cancel - either works fine now.

                • 5. Re: Print Help

                       I see those steps in exactly the same place in both of your uploaded screen shots. I don't think your script will "work fine" if you ever test this with records such that your script can't find any records. wink

                  • 6. Re: Print Help

                         Sorry, but they are not in the same place - see the screen all the way at the top.

                    • 7. Re: Print Help

                           How sill of me! I was checking the same list from the accepted solution and the originating post blush

                      • 8. Re: Print Help

                             Ok, I'll admit it - I did the same thing when I was ready to post the working version!