R_Avery_17
R_Avery_17

Reputation: 305

set parameter value to 'not equal'

I have a report that shows some records. Some of these records have a blank field, so I am trying to set a parameter to switch between records with this field completed, and those with this particular field empty.

I am using a filter on the tablix to say if one field is equal to the parameter value than show those records.

So, I have setup a parameter and have 2 available values.

Open is =""

and now i want to set a value for closed which will return all records that don't have a blank resolved field.

When i run the report, the records come back as expected for open but i cannot work out how to say 'not equal to an empty string' to get the other records to return.

Can this be done?

Upvotes: 0

Views: 1355

Answers (1)

Jesse
Jesse

Reputation: 873

I am confused. If you have a parameter and values for it are, presumably: open and close. In the SQL query against the SQL Server, you can put in your Where:

1 = case when @param = 'open' and isnull(resolved,'') = '' then 1 
         when @param = 'closed' and isnull(resolved,'') != '' then 1 else 0 end

Upvotes: 1

Related Questions