cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I have trouble getting a parameter work in Crystal Reports. I have defined a Parameter variable in the report. The parameter should restrict the data if a value is entered or it has to bring back all the data if the Value is NULL. In the SELECT EXPERT I have a condition that says IF ISNULL (Parameter_FIELD) then a Default Value.

When I run the report I get an error saying that the Parameter has NULL Value. Even If I default it with some Value the report is not working the way we want to. Is there a way I can do what I am trying to achieve. Please advice.

0 Likes
View Entire Topic
Former Member
0 Likes

You could pick a value to represent a null. 'Null' would work if it is a text parameter.

Now create a formula {@null}

If parameter ="null" then 1 else 0

In your select expert use

({@null}=1 or field=parameter)

Former Member
0 Likes

you could also try

if isnull(parameter) or (parameter)="" then true else

=

the null might not be working because your database blank spaces arent defined as null but as blank ""

go to file

opition

make sure you check convert null values check boxes.