DBcalc.value of an Average produces the Sum and not the average.
Hi
I have report that uses a DBCalc with Average.
The average returns 73 ( whcih is Seconds) whcih is the corretc value.
when i add an OnGetText event handler, and perform the following :
Text := DBCalc2.value
The result shows the Sum of all the values being averaged.
Is this a known issue?
Why would it show the Sum and not the actual average?
regards
Ian Robinson
I have report that uses a DBCalc with Average.
The average returns 73 ( whcih is Seconds) whcih is the corretc value.
when i add an OnGetText event handler, and perform the following :
Text := DBCalc2.value
The result shows the Sum of all the values being averaged.
Is this a known issue?
Why would it show the Sum and not the actual average?
regards
Ian Robinson
This discussion has been closed.
Comments
This is a timing issue. The actual average has not been calculated yet when
you are accessing the DBCalc2.Value. Use the OnGetText event of the DBCalc
to assign the final value to a TppVariable, then use this in a different
calculation.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com