Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Generate Report by Current date

Featured Replies

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 by Guest

I won't address the issue of flatfile structure. I'll leave that to Soren. :laugh2:

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

  • Author

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

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.

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.

Thank you for explaining it, Fenton. I'm usually more helpful and explain more (talk too much) but I was in a hurry. :crazy2:

  • Author

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.