newLearner Posted November 14, 2005 Posted November 14, 2005 (edited) Hi, I am very new with FileMaker. User FM 7 with XP. I am working on a report for Sales. The report need to count the calls made per REP and per day. I do no have problem with the part :per REP. My problems is that I have one table:one main form(flat file) . Now from this stage I have a Button that generates a script to create a report. I have 4 fields containing date. I need to validte each one of them and if the date = Curent date show the record on the report. Can you help! Edited November 14, 2005 by Guest
LaRetta Posted November 14, 2005 Posted November 14, 2005 I won't address the issue of flatfile structure. I'll leave that to Soren. You need to enter multiple find requests. Something like: Set Error Capture [ On ] Allow User Abort [ Off ] Enter Find Mode [ ] Set Field [ dateField1 ; Get(CurrentDate) ] New Record/Request Set Field [ dateField2 ; Get(CurrentDate) ] New Record/Request ... etc ... including each field Perform Find [ ] If [ not Get(FoundCount) ] Show Custom Dialog [ OK ; "No records found" ] ... do whatever you need if no records are found Exit Script End If ... Go to Report layout, sort records, preview or whatever you need. LaRetta
newLearner Posted November 14, 2005 Author Posted November 14, 2005 LaRetta, thank you. I will try the script tonight. I wil have to count the records as well.So based on what you sent: If [ not Get(FoundCount) ] Show Custom Dialog [ OK ; "No records found" ] ... do whatever you need if no records are found // Here I need Else statement that will add 1 each time a record is Found. Afrer that I need the TOTAL number of calls. I need to add a field( calulating) to have the TOTAL Shown on the report. Am I on the right track here? Exit Script End If
LaRetta Posted November 14, 2005 Posted November 14, 2005 I assumed you would perform a find then switch to a list layout with parts and sub-totals. If you then sort appropriately you can let summary count for you.
Fenton Posted November 14, 2005 Posted November 14, 2005 For a printed report (or view in Preview mode) you can create a Summary type field, to Count a field which you know would have data for whatever it is you're counting. You then put this in a Subsummary Part, which specifies Rep as the "break" field. Sort by Rep. Enter Preview mode. The summary field will show a count of whatever for the found set of records for each Rep, each in their own Subsummary section. This is pretty much the abc of FileMaker reporting. The fact that you have 4 dates raises a question of "why 4?" if you're only counting calls; so we'll assume you must be counting something else as well. In that case create a Summary Count field for each. The Subsummary part is for each Rep, and will show the correct count of whatever summary fields you put in it, for the found set. I see there is precious little in the FileMaker Help about Subsummary parts and their use. If you follow the "wizard" steps when you create a layout, choose "Columnar list/report" in the first panel, then "Report with grouped data" in the 2nd, with Subtotals and Totals. It will then ask you many questions about grouping data. You'd specify Rep as the field for grouping/sorting, and the Summary fields for the fields to put in the Subsummary and Trailing Grand Summary. If you answer all the questions, it will create the Subsummary part for you. It also creates a Body part, in the middle, which you can then delete, as you don't need or want it for your purpose. [The dialog is a little awkward for adding the Summary fields, as you have to choose one, then add it to the list; and you have to do it again for the Trailing Grand Summary. But it's necessary, and does all the other setup for you.) You must Sort and be in Preview mode to see the report. Don't expect to see it in Browse mode. You can Sort while in Preview mode.
LaRetta Posted November 14, 2005 Posted November 14, 2005 Thank you for explaining it, Fenton. I'm usually more helpful and explain more (talk too much) but I was in a hurry. :crazy2:
newLearner Posted November 14, 2005 Author Posted November 14, 2005 I need to set up the summary field to increment by 1 every time record is found using the Summary Field in FM , not script. What you are saying is that becasue I have the Summary field in the list layout then it will count only the records that are on the report. i do not need a statement in the if statement to increment and count each time. great, that should be easier.
Recommended Posts
This topic is 6951 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now