My.ADVISOR.com Sign-In
Username
Password
Sign Up 
Go to Article
Advanced Search 

REPORTING

Create FileMaker Pro Reports Without Using Finds

Make reporting easy for users with a technique that builds complex reports using relationships, not finds.

By Michael T. Rocharde, Excelisys lead programmer

UNLOCKED -- This article is provided to subscribers of FILEMAKER ADVISOR or DATABASED ADVISOR or FILEMAKER ADVISOR. To subscribe or renew, go to Advisor Store.

In this article, I discuss a methodology for building reports that uses absolutely no finds. You do all the work through a series of relationships. I developed this technique for Hay Manager, a commercial product for farmers that manages the entire farming operation from the time they plant the fields until they receive the final payment for their crops.

Figure 1: Relationship -- Showing the relationship from Reports to Owners.


Figure 2: Relationship -- Showing the relationship from Owners to Farms.


Figure 3: Selection options -- See the difference between selecting one owner and multiple owners.


Figure 4: Relationship -- From Reports to Farms.


Figure 5: Selections -- The different fields that appear based on the selections made from the Farms field.


Figure 6: Reports screen for Farms -- All the available reports and the checkboxes to select are based on what the user wants to see in the report.


Figure 7: Easy selection options -- There may be dozens of different options, so these buttons make it easy to select or deselect all of them at once.

Figure 8: Script code -- Setting a field with the value list items.

The Hay Manager solution has some unusual aspects in that the program can handle multiple owners, each with one or more farms, and each of those farms having multiple fields. I had to find a way for the user to quickly find the records and report he wanted. Scripting a search was impractical because the parameters each user could search would vary dramatically and probably involve multiple find requests. Also, the users weren't familiar with computers and it would be too complex for most users to do the necessary finds manually.


First, I created a Reports table with some global fields:

G_RanchID
G_FieldID
G_OwnerID
G_StartDate
G_EndDate

I set the G_OwnerID field to use a value list (using checkboxes) of all the Owners in the system. In the value list, you're only going to display the second field, which provides a series of checkboxes allowing multiple selections.

Next, create a relationship to the OwnerID field in the Farms table (figure 1).

Then assign another value list to the G_RanchID field that shows only related values (figure 2).

Thus if the user selects one owner, the results display only the farms for that owner. If the user selects more than one owner, the list of farms expands to show all the farms for all the selected owners (figure 3).

Now define another relationship from the Reports table to the Fields table (figure 4).

Add a checkbox value list to the field G_FieldID, which will display only those fields that belong to the selected ranches and that belong to the selected owners (figure 5).

There are different reporting requirements in this solution. If you're running a report based on Owners, you only need to see the ranches for the selected Owners. If you're running a report based on Farms, you only need to see the Fields for those Farms. The most common requirement is to look at Farms and Fields, so put each set of buttons and fields on separate tab panels on the Reports screen so you can focus on the Farms section of the Reports screen (figure 6).

There's just one more thing to do: Make it easy for the user to deselect all the checked values or select all available options (figure 7).

The Deselect button is obvious: It simply clears the Global field. The Select All button uses the value list items to populate the field; i.e., select all the checkboxes. I already set up a series of value lists to display all records from each file. The script is simple: It starts with the field you want the values entered into and enters all the different values with a carriage return between each value. This is the second line of code shown in figure 8.

SetField [Reports::G_RanchID; ValueListItems(get(filename);"Ranches")]

Ranches being the name of the value list.

No Finds Needed

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    Michael Rochard was born in England and has been a full time professional FileMaker developer since 1987. He co-founded the first FileMaker-only consultancy in the UK. Michael has worked with many Fortune 500 companies and has developed solutions for virtually every industry. He specializes in highly visual intuitive interfaces. Michael works as a consultant for Excelisys but also has his own company, TimeGain Software, which provides Web site design, graphic design, and business development services in addition to FileMaker development. rochard@timegainsoftware.com or rochard@excelisys.com

    Printer-friendly
    page layout

    Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro, Reporting

    ADVISORAMA
    Reading this book is like waiting for the first shoe to drop.
    -- Ralph Novak

    ARTICLE INFO

    FileMaker Advisor

    Web Edition: 2008 Week 08, Doc #19237

    Print Edition: April/May 2008, Page 14

    SUBSCRIBER ONLY ARTICLE LOCKED

    Subscribe to FileMaker Advisor Magazine

    Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

    FileMaker.Advisor.com

    Subscribe to Advisor Basics of FileMaker Pro

    Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

    FileMaker.AdvisorBasics.com

    Secrets Of The Top Experts -- Now!

    See exactly how to do it, step-by-step, in Advisor Academy CDs created by the top experts. Click to see what you can learn right now.

    AdvisorAcademy.com

    Free E-Newsletters

    Keep up! Hot News, How-To, Tips & Tricks, Expert Advice, and more. Click to request your's free.

    AdvisorUpdate.info

    Need Know-How Now?

    What direction are you going with your business? Advisor Guides are packed with the answers you need to work smarter. Can you afford to fall behind?

    AdvisorStore.com

    Showcase Your Smarts

    Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

    AdvisorTips.com

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    rochm003 posted 02/18/2008 modified 05/12/2008 03:42:33 AM ztfmfd/ztfmfd
    domino-144.advisor.com my.advisor.com 05/16/2008 12:13:39 PM