FMPRO-L Archives

July 2011, Week 2

FMPRO-L@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Geoff Graham <[log in to unmask]>
Reply To:
FileMaker Pro Discussions <[log in to unmask]>
Date:
Thu, 14 Jul 2011 16:20:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (18 lines)
>I do have calculations on the layout, what is the work around?

You’ll have to get the slow ones off the layout. The workaround depends.

Is it okay to display the previous session’s data upon opening the file? If so, then create a plain field to store the results of the slow un-stored calc. Insert a script step in your report script to copy the un-stored value to this new field. Display that field in place of the calc, and now the layout is no longer slow.

But the slowness has now just been moved to the script. If the script has to run every time the layout is viewed, then the above doesn’t buy you much. You may have to re-write something to go to the related records where the value in question is calculated from, and do the summary yourself. 

Speed in these situations can be obtained by making values stored. You can auto-enter some granular part of your calc at the lowest record level and store the results of that. Then when report time comes you only have to total a column of stored numbers; rather than execute a calc for each and every row and then total the results.

Here’s a random lame example:

Take an Invoices table with a child table of line items. The line items has Price_Shipped_Extended, which is the unstored final price of each line item record. (something like: (Qty *Round(Wholesale * (1 – Discount); 2)). When a yearly report on a  particular item or account is run, given a few hundred thousand line items, it will be slow to total up. The fix is conceptually simple: make Price_Shipped_Extended a stored value. Let's say I tried, and FileMaker won't let me store it. I realize that "Wholesale" is simply the price from the Products table being pipelined directly into line items. The fix in that case is to make a new "Wholesale" field in the line items file, and copy the price from the products table when the line item record is created, or at the time a product is entered in. Since the price (and Qty and discount) are now stored values, the extended price can now also be stored, for possibly a 10X speedup in reporting time.

Giving us some details about what you are displaying on your layout and why will help us give you some ideas and experience on workarounds, and save us all from my lame examples.

Geoff

ATOM RSS1 RSS2