Originally posted by lockwelle
which goes back to my original response.
Since all of the data is not 'intrinsic' to the raw data...or all on the same row of data (previous is not on the same row) then the formula cannot be aggregated by CR.
The way around this is to used shared variables...maybe running totals (they are not my forte, but DBlank's)
with shared variables you to something like:
group header
shared numbervar cnt:=0;
shared numbervar sm:=0;
""
group footer, where you want to display the average:
shared numbervar cnt;
shared numbervar sm;
if cnt>0 then
sm/cnt
else
0
details, this is where the fun is...
probably just update your lapsed time formula to be something like
shared numbervar cnt;
shared numbervar sm;
if (some criteria) then (
cnt := cnt +1;
sm := sm + ({table.field}-previous(table.field));
)
HTH
""
I'm leaning towards this option. Create a running totals of the time then calculate average of that. I initially wanted a way to create a formula that calculated the average of the datediff.