Walter Meester
HoogkarspelNetherlands
General information
Category:
Third party products
Hi steve,
How about preparing and sorting the data at forehand in stead of in the report ?
SELECT Starttime, EndTime, endTime-Starttime as Interval, ... FROM MyTable ORDER BY 3 ...
Walter,
>I tried that, but I was right back where I started.
>
>I need to sort the average time intervals so that the organization with the shortest time interval ends up on top, as the winner. I guess what I am really asking is how to sort the groups in the main report on the average time interval formula result for a formula that I call @avgtimeinterval? Maybe I don't need a subreport. But the problem I am running into trying to do it all within the main report is that I don't see the formula name in the list of fields to choose from for a group sort field. And when I right-click the formula in design mode, I can't choose Insert Summary which would allow me to make a Minimum Summary Field and sort on that field instead.
>
>Do I even need a subreport to do what I am trying to do? Here's an example of my main report in brief:
>
>In the Details of the Main Report I sort on Organization and TimeIntervals -
>Organization StartTime EndTime TimeInterval
>Org A 8:00am 8:05am 5:00
>Org A 9:00am 9:10am 10:00
>Org A 7:00am 7:15am 15:00
>Org A 10:00am 10:30am 30:00
>In the Group Line of the Main Report -
>Org A Number of TimeIntervals = 4 Total TimeIntervals = 60 min. Avg = 15 min.
>
>Organization StartTime EndTime TimeInterval
>Org B 8:00am 8:10am 10:00
>Org B 9:00am 9:20am 20:00
>Org B 7:00am 7:30am 30:00
>Org B 10:00am 11:00am 60:00
>In the Group Line of the Main Report -
>Org B Number of TimeIntervals = 4 Tot TimeIntervals = 120 min. Avg = 30 min.
>
>Organization StartTime EndTime TimeInterval
>Org C 8:00am 8:01am 1:00
>Org C 9:00am 9:02am 2:00
>Org C 7:00am 7:03am 3:00
>Org C 10:00am 11:04am 4:00
>In the Group Line of the Main Report -
>Org C Number of TimeIntervals = 4 Tot TimeIntervals = 10 min. Avg = 2.5 min.
>
>But then I want to sort the Groups so that Org C is on top with 2.5 min., followed by Org A with 15 min. and Org B with 30 min. How would I go about solving this problem? I am not understanding something. Thanks for all of your help. I think I just need a clue to point me in the right direction.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only