Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Don't let weeds grow around your dreams
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

14
October

When is a zero not a zero??????

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

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

19 + 64 =