2 Replies Latest reply on Oct 18, 2011 2:40 PM by MichaelLane

    Restrict Report to specific client



      Restrict Report to specific client



      I have a report that lists jobs carried out for clients.

      The main fields are: [Client_ID], [Client_Name], [Job_Date], Job_Details].

      How can Filemaker ask me for a [Client_ID] and then restrict the report to just that one client?

      Thanks in advance for any assistance.


        • 1. Re: Restrict Report to specific client

          Looks like you should have two tables, one for the Client info such as their name and ID and one for the Job Info. Otherwise you have to duplicate data each time you do more than one job for the same client.

          That said, here's a script that can do what you describe:

          Define a global field, gClientID and put it on a layout designed as the starting point for setting up your report. After you have the basics working, you can add more fields to this layout to specify additional criteria such as a date, range of dates or type of Job.

          Format this field as a pop up menu or drop down list, listing Client_ID in field 1 and Client_Name in field 2.

          Put a button next to this field or set up the field with a script trigger to run this script:

          Go To layout [//specify report layout here]
          Enter Find mode [] //clear the pause check box
          Set field [ YourTable::Client_ID ; YourTable::gClientID]
          Set Error Capture [on] //keeps dialog box from interrupting the script if no records are found
          Perform Find[]
          Sort Records [restore ; no dialog ] //optional but usually needed for your report

          • 2. Re: Restrict Report to specific client

             Very many thanks for the prompt and clear solution.