Over the last few months I have had a number of clients contact me w.r.t. their conditional formulas returning unexpected results.
The issue seems to stem from testing a value for 0!
On the face of it its seems to be an easy enough fix, until you try it yourself, and you find that sometimes in Crystal Report 0<>0!
When looking at a value and all you see is 0, one automatically assumes
the value is 0, even if one decides to go to 3 or 4 decimal points, but
if the actual figure is 0.00000000001, technically this is not zero, and
therein lies the problem!
Solution:
Use the function Round()
If Round({tablename.fieldname},2) then ....
This way the conditional formula is only testing the first 2 decimal places of the field to determine if its 0 or not
If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us |