The Monthly Sale Report Scripted ( Part 3 )

From Dwayne Wright -

This is a series of discussions on the breakdown of a monthly sales report. This report is designed to be able to be reused in just about any sales report situation. The total script itself can be found at ...



#FIND months invoices
Set Error Capture [ On ]

Go to Layout [ “dev_Invoices” (MonthySales) ]

Enter Find Mode [ ]

Set Field [ MonthySales::Date; GetAsText(Date ( MonthySales::~sm_Month ; 1 ; MonthySales::~sm_Year) & "..." & Date
( MonthySales::~sm_Month + 1 ; 1 ; MonthySales::~sm_Year) -1) ]

Perform Find [ ]

#ERROR DETECTED - no matching records found
If [ Get ( FoundCount ) < 1 ]

Show Custom Dialog [ Title: "SEARCH ERROR"; Message: "No records were found matching your search settings."; Buttons:
“OK” ]

Go to Layout [ original layout ]
Halt Script

End If

Above you can see that I’m going into find mode and setting the date field equal to the range of the month to report upon. I have some basic error checking just in case no sales records are within that month.
More info about the author and FileMaker in general, contact me at

© 2007 - Dwayne Wright -

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.