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

Using Variable to calulate on two DBCalc values

edited January 2002 in General

Hello,

I'm trying to calculate a value, but it's not coming out correctly. Here
is the code:

Value := FloatToStr((CategorySum.FieldValue /

CategoryCount.FieldValue));

It's almost right, but off by usually a dollar or two and some change. It
this the correct way to do this?



Thank you,




--


Didn't we go to different schools together?

Comments

  • edited January 2002
    You may want to pull the field value directly from the datapipeline and use
    another variable (vblCount) for the counter. Set the CalcOrder property of
    the variables (they must be located in the same band) to calculate so that
    the first varaible to calculate is the counter.

    Value := plOrders['AmountPaid'] / vblCount.Value;


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.