How do I fix this error "a boolean array is required here" in Crystal report?

I use Crystal Report 8.5
I just want to add a formular field to the report but the database fields in my formular contain null value. I've tried the convert null to default value in the Report Options. But it doesn't work. It makes my report shows no result at all. So someone suggested me to convert the null field by creating a newformular field of that null field using if then else.
i.e. database field that contain null are A, B, C, D.
I want to make a new report field that get the value of A+B+C-D
what I did was:
@A = if isnull(A) then 0.00 else A = A
and the same for @B, @C, and @D
@WDV = @A + @B + @C - @D  
But then I come across this error "a boolean array is required here" and it show the ( at the @B
How do I get this right?
lotusseedAsked:
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.

mlmccCommented:
A formula can only return a single type.

Can you post the actual formulas you are trying to use?

mlmcc
lotusseedAuthor Commented:
@add
if isnull({FasMast.additions}) then {FasMast.additions} = 0.00
    else {FasMast.additions} = {FasMast.additions}

@depre
if isnull({FasMast.book_dep_total}) then {FasMast.book_dep_total} = 0.00
 else {FasMast.book_dep_total} = {FasMast.book_dep_total}

@pur
if isnull({FasMast.purch_value}) then {FasMast.purch_value} = 0.00
 else {FasMast.purch_value} = {FasMast.purch_value}

@reval
if isnull({FasMast.reval_adj}) then {FasMast.reval_adj} = 0.00
 else {FasMast.reval_adj} = {FasMast.reval_adj}

@wdv
{@pur}+{@add}+{@reval}-{@depre}
mlmccCommented:
Try it this way.  All your formulas return true or false not numbers

@add
if isnull({FasMast.additions}) then
    0.00
else
    {FasMast.additions}

@depre
if isnull({FasMast.book_dep_total}) then
    0.00
else
    {FasMast.book_dep_total}

@pur
if isnull({FasMast.purch_value}) then  
    0.00
else
    {FasMast.purch_value}

@reval
if isnull({FasMast.reval_adj}) then
    0.00
else
    {FasMast.reval_adj}

@wdv
{@pur}+{@add}+{@reval}-{@depre}

mlmcc

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
lotusseedAuthor Commented:
Thank you so much, it works now.
lotusseedAuthor Commented:
Thank you very much.
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
DB Reporting Tools

From novice to tech pro — start learning today.