Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Problems with Average in Groupfooter

edited July 2013 in General
Hello,
we are using RB Ruilder 14.06 Build 249.
We want to build an avarage out of an DB Value in our Detailband.
The avarage which is calculated in the DBCalc is correct.
In one other variable in the same groupfooter we use the DBCalc(Avarage)
Field.
Variable1.Value := DBCalc(Avarage).Value

BUT in this Variable is shown a other Value then in the DBCalc Field.
In a test, we change the avarage in count. The DBCalc Field shows 84 the
Variable1.Value shows 83.

Does anyone have an idea?

Comments

  • edited July 2013
    Hi David,

    The variable component calculates at a different time than the DBCalc so
    it is likely not finished with it's calculation before you are accessing
    its value.

    If you need an average in a Variable, I suggest manually calculating it
    inside the OnCalc event of the variable or doing so as a calculated
    field in your DB.

    Best Regards,

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