Ok, you'll need a couple of variables and a couple of formulas to do this.
{@TimeDifference}
NumberVar ddiff;
If OnFirstRecord then
ddiff := DateDiff("n",{ORDER_PROC.ORDER_TIME},{ED_IEV_EVENT_INFO.EVENT_TIME})
else
ddiff := ddiff + DateDiff("n",{ORDER_PROC.ORDER_TIME},{ED_IEV_EVENT_INFO.EVENT_TIME});
Put this formula in the Group Header. With the semi-colon on the end, it won't display anything.
{@OrderCount}
NumberVar ordCount;
if OnFirstRecord then
ordCount := 1
else
ordCount := ordCount + 1;
Put this formula in the group header as well. With the semi-colon on the end, it won't display anything.
{@AvgTimeDiff}
NumberVar ddiff;
NumberVar ordCount;
if ordCount > 0 then
ddiff / ordCount
else
0
Put this in the report footer - there is no semi-colon on the end so it will display the average value.
-Dell