Sunday, February 15, 2009

FILEMAKER: The List Function In Reporting

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

Chapter 3: Advanced Report Design

Obviously, data appearing in a list is critical in any sort of reporting operation. We have discussed at length some of the layout design options for building reports but I want to introduce a different way of reporting. Some reports can be contained within a text string by using the LIST function.

The syntax of the list function is List ( field {; field...} ) and it was introduced with the release of FileMaker 8.5 and it will return a text base result.

The list function will provide you a return-delimited data list from one or more related data field(s) or a repeating field(s). For the most part, this function is used for gathering related data in one large block and then using it for correspondence. For example, a list of related invoices in which you want to include in a batch email to each client in a found set. It is also possible that you would use the list function to pull a collection of related data as a list and then parse it out by using some of the value related text functions.

Now you might be wondering about the connection between correspondence and reporting? What a minute, let it sink in, of course! A report that isn’t communicated isn’t much of a report and it is often included within the correspondence between work group members. Sure you can include pdf documents in your correspondence but what about the raw power of including the information within the email or the letter itself?

Here are some links to other posts that might be of interest in regards to this topic...
Putting The Portal Contents Into Single Piece Of Text
CF_ListToCommas Custom Function Posted On BrianDunning.com
E-Mailing Information In A Portal
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

Sunday, February 1, 2009

FILEMAKER: Printer, PDF, Excel And Other Output Types

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

Chapter 3: Advanced Report Design

In a prior post, Reporting Outputs In The Modern Age, I chatted about how reporting has changed from the standard output to a laser printer. I want to dive into that topic a little deeper today. In many cases, your other output options will be a PDF or Excel spreadsheet. This is a more eco-friendly way of presenting the data and it has some valid productivity advantages as well. In fact, reporting routines that output into computer documents can be automated! So the reports are done after traditional business hours and are waiting, first thing in the morning, for their audience when they come into the office.

Way back in the 1990s, I was working for Apple Computer and I was the "go to" FileMaker database guy for our building. We had two dozen or more FileMaker database solutions that serviced most of the individual workgroups. At one point, I was getting reports of extreme database slowdown, then the problem would simply vanish, before I could pin down the issue. It turned out that the problem would often be that managers would be running the same intensive reports at the very same time of the day in order to prepare for a meeting with some corporate big shot. As a test, I ended up archiving reports on a managers server in both PDF and Excel format. The pdf copies were better suited for printing or emailing and the excel versions were better for raw material for their own reports. The managers absolutely went nuts about this small process and I was even nominated for a productivity award (for something so rudimentary simple to do).



HOW TO CREATE A PDF REPORT
Save Records As PDF (portable document format) is available as a menu command (from under the File menu) and is also available as a script step. Each option allows you to create a PDF document based upon a FileMaker record or found set of records. The Save Records As PDF script step has some interesting options such as appending to an existing pdf, automatically opening the newly created file or auto creating an outgoing email (with a compatible email client) and have the file attached as an email enclosure.

REPORTS THAT NEED TO BE EXPORTED
There are times in which the reporting values that you are working with 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 an Excel spreadsheet or perhaps an application specializing in generating professional looking charts. Exporting routines can often be a manual process, because it allows for more "spur of the moment" flexibility. Standard exports can be written into scripted processes and then the developer will often assign the action to a button or custom menu option.

E-MAILING THE REPORT
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 is more time intensive to setup but can get you around any potential enclosure issues. It can also be nice for very quick summary reports that have only a few lines of values.

ARCHIVING REPORTS IN A DATABASE
An interesting twist is that you can store report documents in FileMaker container fields or you can simply store a reference to where the report files are located. If you are going to store references in a container field, I would recommend using the same network volume for all references. Working with references has its advantages but it may require some detailed scripting or education to your end users about the process. To help matters along, you can put in some error checking in this process to help keep all your references straight.

So having your FileMaker productivity reports stored within another FileMaker database is pretty neat. Now container fields themselves do NOT have labels about the data they contain. You cannot do a find and you cannot sort based upon the data within the container field itself. One way around this is to create an additional text field that describes what is in the container field and use that description field for finding and sorting needs.

Here are some links to other posts that might be of interest in regards to this topic...
Dead Tree Format
Save Records As PDF Script Step
FileMaker Save As PDF Script Step Crashing In Leopard
Using Append To PDF In Reporting
A READER ASKS: PDF Resumes In A Container Field
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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 ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html