AnsweredAssumed Answered

PROBLEMS WITH WRITING SCRIPTS TO PRODUCE RELIABLE REPORTS

Question asked by bess on Jan 11, 2012
Latest reply on Jan 13, 2012 by Stephen Huston

Dear FileMaker Developer Community,

 

I am hoping that someone out there can help me with a script problem. I've done a lot of work with a much older version of FileMaker Pro, but I'm new to scripts and I am doing something wrong with scripts to produce Reports.

 

 

I have a small database; the major table is called "Clients" (CCS Cients 1). Each client is identified by a number e.g. ##/06 (where 06 = 2006, 12 = 2012, etc).

 

From the Client information, I want to be able to produce fully automated reports. I am currently looking at 2 reports, both look at HOW the clients heard about us. One report is called "Referral Source Totals" & should return a result of 34 entries. The other is called "Referral Source 2006" & should return a result of 25 entries.

 

To cut a long story short, at the minute there are 2 major problems:-

  1. if I go from 1 report to the other, in either order, the results will refer to whichever report I looked at first (i.e. "Totals" could return 25 entries, not 34, if I had previously looked at the "2006" report, or vice versa);
  2. sometimes a message flashes up telling me to modify the find???

 

For the report "Referral Source Totals", I am using a script which goes:

 

  • Enter Browse Mode [ ]
  • Go to Layout ["Report Referral Source Totals" (CCS Clients 1)]
  • Enter Find Mode [ ]
  • Perform Find [ ]
  • Unsort Records [ ]
  • Go to Record/Request/Page [specify First]
  • Sort Records [Restore; no dialog] [specify Sort Order Client_Referral_Source (ascending), Client_MF (ascending), Client_Year (ascending), Client_Number (ascending)]
  • Enter Preview Mode [ ]

 

For the report "Referral Source 2006" , I am using the following script:

  • Enter Browse Mode [ ]
  • Go to Layout [Report Referral Source 2006" (CCS Clients 1)]
  • Perform Find [ ]
  • Unsort Records [ ]
  • Go to Record/Request/Page [specify First]
  • Perforn Find [Restore] [specify ACTION Find records CRITERIA CCS Clients 1::Client_Number: [=##/06] ]
  • Sort Records [Restore; no dialog] [specify Sort Order Client_Referral_Source (ascending), Client_MF (ascending)]
  • Enter Preview Mode [ ]

 

Please can someone help! I suspect that I am making a quite basic mistake and hope that someone can tell me (in easy to follow terms!) how to put it right.

With thanks in advance

Bess

Outcomes