Dealing with blank or null in ssrs

reporting-services

In my report, I have an expression which is used to pass a parameter to a child report parameter which is set to allow null values. The expression is :
=IIf(Parameters!Lead.Value = "False",Nothing,Fields!Paid.Value)

The above expression returns values only when Fields!Paid.Value is not blank. Therefore when Fields!Paid.Value is blank I get an error

"the value provided for the report parameter is not valid"

How do I modify my expression to parse these two conflicting issues?

What I want is to be able to return values when the Fields!Paid.Value is blank or when it is not. So at all time when the expression runs corresponding values are returned without the error stated above.

Thanks for helping out.

Best Answer

The first thing you do, wherever you have used the "Paid" parameter, set it to allow null value. Allow null only not blank.

The second thing about the expression, use something like this,

=IIF(Parameters!Lead.Value "FALSE", Nothing, IIF(IsNothing(Fields!Paid.Value),0,Fields!Paid.Value)
Related Topic