Link to home
Start Free TrialLog in
Avatar of lotusseed
lotusseed

asked on

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?
Avatar of Mike McCracken
Mike McCracken

A formula can only return a single type.

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

mlmcc
Avatar of lotusseed

ASKER

@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}
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much, it works now.
Thank you very much.