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

DBCalc Sum question

edited March 2008 in General
I am using an old verison of the report writer and cannot upgrade (I
think) for a few reasons. I think its 7.01 or something close to that.

Anyways, for some of the reports, in our database we have user-defined
fields. One of the user defined fields is a character field. However,
one customer is putting numeric amounts in there and wants to have a
total at the end of the report with this field. However, the total
always prints zero. I think this may be because of entries in the
database that are not numeric (ie blank or characters), but I am not
100% sure. Is there a way to have the component (or a new one), if the
amount in the field is not a number, assume zero for the number and add
that to the total so that at the end of the report an actual number is
shown. For example:

ParcelNbr Udf1
--------------------
a1 10.5
a2 a
a3
a4 4.25
----
14.75

a2 and a3 udf1 would internally add zero to the total.

Thanks.

Comments

  • edited March 2008
    Hi Jeff,

    Rather than using a DBCalc, try using a TppVariable and take complete
    control over the calculation you are making. In the OnCalc event of the
    variable, you could for instance, get the field value, convert it to an
    numeric amount (if possible) then add it to the total...

    --
    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.