if ({Dao.SpWDiscount}='100') then {Dao.CurrentSpecialWater}=0 else {Dao.CurrentSpecialWater}

it shows boolean is required  here
anjali kulkarniAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Change to:
if  ({Dao.SpWDiscount}='100') then 0  else  {Dao.CurrentSpecialWater}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mlmccCommented:
Ido has given you the solution, however a bit of an explanation will help you avoid the issue in the future.

A IF statement can return one of 2 results.  One for the THEN part (if test is TRUE) and one for the ELSE part (if test is FALSE).
These 2 results must be the same data type.  

In your example the THEN part returns a BOOLEAN value of the comparison between Dao.CurrentSpecialWater and 0.  The Else part returns the value of Dao.CurrentSpecialWater which is a number.

Ido's solution is to return 0 for the THEN part and Dao.CurrentSpecialWater for the ELSE part.

mlmcc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.