4 Replies Latest reply on Nov 25, 2012 2:10 AM by ChrisSmythe

    Script - Print-out multiple Reports

    ChrisSmythe

      Title

      Script - Print-out multiple Reports

      Post

           Hello, I am running FileMaker Pro v12 on Windows XP and am hoping that someone would kindly assist me with the following (please see my database at the following link:

           https://www.sugarsync.com/pf/D0681807_60165357_49551  (Account Name: Admin   Password: click on OK as there is no password).

           I am trying to create a script that allows the user to enter in a person's employeeID number so that the following reports print-out automatically:

           Deployment Details Report;
           Emergency Contacts Report;
           Personnel Report;
           Special Considerations Report; and
           Temporary Change of Address Report.

           At the moment, I can print-out each report manually via the Reports Layout, but was hoping that I could automate this process.

           The person's employeeID is from: Personnel::EmployeeID

           Kind regards,

           Chris smiley

        • 1. Re: Script - Print-out multiple Reports
          philmodjunk

               I don't have time at this moment to examine your file.

               Can you use a script to produce any one of these reports or do you do it by finding and sorting records manually?

          • 2. Re: Script - Print-out multiple Reports
            ChrisSmythe

                 Hello PhilModJunk, thank you for your assistance - much appreciated.

                 The reports are already made and ready-to-go.  The user needs to perform a Find on the Personnel::EmployeeID field.

                 They then click on Perform Find button;

                 Then they click on the Preview button;

                 Then they click on the Page Setup button;

                 Then they click on the Print button; and

                 Finally they click on the Exit Preview button.

                 I have tried many times before to do this, but I simply cannot get the script to work.

                 Any assistance is greatly appreciated.

                 Kind regards,

                 Chris smiley

                  

            • 3. Re: Script - Print-out multiple Reports
              philmodjunk

                   What parts of the script can you get to work?

                   I would use a global field formatted with a value list of Employee ID's and names for selecting an employee. Then this script would find records using the value in that global field:

                   Go to layout [personnel]
                   Enter Find Mode []  ---> clear the pause check box
                   Set Field [Personnel::EmployeeID ; Globals::gEmployeeID]
                   Set Error Capture [on]
                   Perform FInd[]
                   If [Get ( FoundCount ) ]
                      Enter Preview Mode[pause]
                      Print
                   End If

              • 4. Re: Script - Print-out multiple Reports
                ChrisSmythe

                     Hello PhilModJunk, thank you for your excellent suggestion - it works very well - I am very grateful.

                     Kind regards,

                     Chris smiley