Tuesday, July 22, 2008

FILEMAKER: Variations In Report Types

From Dwayne Wright - Certified FileMaker 9 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

If you have been creating FileMaker reports for a while or reading up on FileMaker reporting, you know the typical report is a list view of records in a found set that has summarized information about one or more fields. In the case of subsummary totals, the report normally has to be printed out, saved as a pdf or viewed in the database in print preview mode.

I do want to express that this Find, Sort and Print is only the most basic type of report. In most cases, the basics are all you need and can benefit any business it is designed to accommodate. Here are some of the other times that you might want to include in your reporting generation portfolio.

HARD CODED SEARCHES VS USER SPECIFIC
There will be some reports that are static in the nature of what they want to show you, for example, all clients with invoices past 30 days due. This report can have a hard coded search put into place. In cases, like this the developer does need to take into account that the hard coded search might come up empty (no records were found with invoices past 30 days due, for example). Other reports can be used to allow the user to do a search first or report on the records that are in the current found set. The first walks the user through the search and the second needs to communicate to the user “report on what I have got right here.”

EMAILING REPORTS
This can be done in two main ways, the first is to print the report to a pdf document and then send the pdf document as an enclosure. Using ScriptMaker, you can add email pdf report features to your reports as part of the report generating script. The other method is to put the report data in your email as text. This can be done via ScriptMaker as well but it does take some additional work.

USER SPECIFIED REPORT CONTENT
I have already posted an example file on how to allow your users to specify their own report title for a report ( EXAMPLE: Simple Report With A Selected Title ). However, you can notch it up a few levels for allowing your users to specify what fields they want in a report and change the sort order presented in the report. This is fairly advanced stuff but well within the grasp of a user that is comfortable with FileMaker calculations, scripts, layout design and scripts.

REPORTS THAT NEED TO BE EXPORTED
There are times in with the reported values need to be exported, so they can be incorporated into a different application. For example, you might want to export the monthly sales activity so that it can be imported into Excel or a chart generating application.

REPORTS THAT ARE BEST USED IN AN INDEPENDENT ENGINE
There are some reports that use a large amount of data, large amount of fields and/or a large amount of calculating. In a case like this, you might want to export the data to a different database file and run it independent of the main database system.

The above is not a complete list of report variations but just what I could think of as I was typing this content into this posting. By all means, I’m interested in hearing about other report variations you might have come across. So please feel free to email me at info@dwaynewright.com with your reporting thoughts and ideas.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

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.
====================== ADVERTISEMENT ==============================
For more information on the InBizness SOHO and other quality FileMaker framework solutions, please visit http://www.dwaynewright.com/solutions.html

Saturday, July 12, 2008

EXAMPLE: Simple Report With A Selected Title

From Dwayne Wright - Certified FileMaker 9 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

This is a fairly simple report that comes up in the new window and this is a small twist to a previous example. The twist is that we allow the user to select the title of the report within the script. I’ve added the field to the example layout but normally, you wouldn’t do that. Instead, you would use the Custom Dialog Message script step to allow the user to type in the report name. That is what happens when you click the Run Report button in this example.

The Show Custom Dialog Box step has the ability to allow a user to add data to up to 3 fields directly from the dialog box. Other features include the ability to use literal text or a calculation to show the dialog box title, the dialog box main message and the labels for the input fields.


Basically, the report title is a global text field. So it will be user session specific and still allows the user to customize the report title for their needs. You can use this technique in other areas of your report, to spruce it up as well.

Here you can see the first step in defining your show custom dialog with the title of the dialog box, the message content and the buttons you want to show.

Here you can see the second step in defining your show custom dialog the selection of what data fields you want the user entering data into and the label for each.

Here you can see the resulting dialog box that comes up when the script is executed.

Here you can see report title equals what the user typed in, the global text field is a merge field on the report layout.

ABOUT THE REST OF THE REPORT
We only have two data fields which include an invoice date and an invoice amount. What we want to do is show a report that summarizes the invoice sales for each year and then further broken down by the month of the year. The report will run on the found set of records. So you can do a find for a particular set of records and then run the report.

There are two sorted by subsummary layout parts the sort fields uses are both calculation fields. The first is year of the sale and the second is the month of the sale. There is a script that runs the report in a new window and a subscript that handles the report printout actions.

Clicking the Run Report button will activate the report. You might want to have the script debugger running if you have FileMaker Advanced installed on your machine. That will allow you to see the individual script steps execute one at a time from the script debugger window.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles08/ReportTitle.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

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.
====================== ADVERTISEMENT ==============================
Click Here To See The FileMaker Book (via a blog) homepage!
===================================================================

Wednesday, July 2, 2008

EXAMPLE: Simple Report In A New Window

From Dwayne Wright - Certified FileMaker 9 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

This is a fairly simple report that comes up in the new window. We only have two data fields which include an invoice date and an invoice amount. What we want to do is show a report that summarizes the invoice sales for each year and then further broken down by the month of the year. The report will run on the found set of records. So you can do a find for a particular set of records and then run the report.


There are two sorted by subsummary layout parts the sort fields uses are both calculation fields. The first is year of the sale and the second is the month of the sale. There is a script that runs the report in a new window and a subscript that handles the report printout actions.

Clicking the Run Report button will activate the report. You might want to have the script debugger running if you have FileMaker Advanced installed on your machine. That will allow you to see the individual script steps execute one at a time from the script debugger window.



An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles08/ReportExample.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

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.
====================== ADVERTISEMENT ==============================
To check out the online FileMaker Crosswords, please visit http://www.dwaynewright.com/crossword.html
===================================================================