Nulls in calc field-strange behavior
I have a FlashFiler table with two currency fields. These fields either
contain a value of $100 or they are null.
When dbcalc sum field is created to total these fields, the null values
cancel out the $100 values. Thus, if there are 20 nulls, and 20 $100
values, the sum is zero. Twenty nulls, and 30 $100 values, the sum
equals $1,000.
Any idea as to what is happening?
Thanks for any hints!
John
contain a value of $100 or they are null.
When dbcalc sum field is created to total these fields, the null values
cancel out the $100 values. Thus, if there are 20 nulls, and 20 $100
values, the sum is zero. Twenty nulls, and 30 $100 values, the sum
equals $1,000.
Any idea as to what is happening?
Thanks for any hints!
John
This discussion has been closed.
Comments
Can you send us an example to support@digital-metaphors.com
As a workaround, use a TppVariable of currency type and code the OnCalc
event handler for it. What values are coming through for the variable when
the field vaue is null? If still you find no luck, then try setting the
DataType on the variable to a floating point type and apply a currency
display format to it.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks for the help. I will probably pursue your first suggestion. However, for
diagnostic reasons, you may want to know the following... I wrote a routine
which wrote zeros to the null fields en masse, and the calcs worked OK.
Certainly, this is not the preferred solution, so thanks for the help.
I'll zip up a small demo with the affected FF table and report.
Thanks again,
John