Home General

DBcalc.value of an Average produces the Sum and not the average.

edited March 2010 in General
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

Comments

  • edited March 2010
    Hi Ian,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.