Possibly something like this...
In a formula field...
NumberVar Evnt;
If Previous({Table.EndTime}) <> {Table.StartTime} then
Evnt := Evnt + 1;
Evnt
If you have your StartTime and EndTime in the Details Section, place this new formula field in the same Details section. The number will increment when the Previous End Time does not equal the current Start Time. This formula isn't really necessary for your report but will help you visualize how it increments on each change of Event Group. To use it though, you could for example do Running Totals based on this number changing method. Say you have a Numeric field to sum based on the event grouping. Put the Numeric field in details, right click the field and choose Insert Running total.
- Type of Summary is Sum
- Evaluate on each Record
- Reset value based on Formula, open the formula X2 and enter
Previous({Table.EndTime}) <> {Table.StartTime}
//essentially the same formula or principle as above...
Save and close. It will total the by the Group Event.
Also, be sure in the Options (or Report Options) to set NULL values to default to get the first value of the formula field to return 0.
The problem is, what if an Event that is not part of the Group happens to have the correct comparision that will NOT increment the next value, but they are really two different events. Is there no other field with an Identifier for each group of events? Seems like there would be.
Not sure how you need to use it, but hope this is helpful.
Edited by tconway - 28 Dec 2007 at 8:53pm