Greetings Beatrice,
You should be able to use the running total Summary field to evaluate
correctly in your calculation using the "GetSummary ( summaryField ;
breakField )" function in your calculation, where
Lee.
=================
Binary Assist
220 Gaines Oak Way
Suwanee, GA 30024
Voice: (678) 313-5604
Internet: [email protected]
Website: www.binaryassist.com
FileMaker 8 Certified Developer
On Mar 11, 2009, at 5:18 PM, Beatrice Beaubien wrote:
Hi All,
This was a fun task, until I hit an odd wall. Any help would be most
gratefully received. This is in FMP 9/10.
Background:
In an Agenda report there are (say) five categories of agenda items,
sorted on Order (1-5). Three of these categories have more than one
record. Each Agenda Item has a length of time in minutes (in the
"length" field), and each meeting has a start time. In addition,
each item has a (redundant theoretically [but read on]) start and
end time.
The report layout is composed of:
• Title Header
• Header
• Leading subsummary part on Order
• Body
• Footer
• Title Footer
The report is generated with a sort on Order.
Programming task:
As noted above, at the moment the beginning and end times of each
item are entered manually, in addition to the length of time each
item will take. I would like to only require the length of time be
entered. Also, the start and end times of each main category is what
the user wants, not the individual items' start and end.
A Summary field with the Running Total of "length" gives the total
amount of time until the end of that Category, and a Summary field
with the total of "length" gives the length of time for each Category.
Something like this should work as a Start time — End time display
field in the Leading subsummary report:
Start time: MeetingStartTime + Time (0;
(RunningTotalOfMinutesOfAgendaItem -
TotalSubSummaryMinutesOfAgendaItem) ;0)
End time: MeetingStartTime + Time (0;
(RunningTotalOfMinutesOfMainAgendaItem ) ;0)
Problem:
A Summary field of a running total in a Leading _or_ Trailing
Subsummary shows the correct number (say 60 for the third category
that will end an hour after the meeting starts). However when I use
that field in any calculation in a Leading Subsummary part, in the
calculation it gives the running total to the first record in the
category (say 20), not what it is displaying (60).
As expected, in a Trailing Subsummary, it results in the correct
value when used in a calculation.
Challenge:
Is it possible to get the running total Summary field to evaluate
correctly in a calculation field in the Leading Subsummary part? If
so, how?
Thanks in advance for any insights.
Best wishes,
Beatrice Beaubien, Ph.D.
i2eye, Toronto, Canada
FileMaker Business Alliance
FileMaker Certified Developer