My SSRS report has a dataset using this query
select c1, c2
from t1
where c3 = isnull(@parameter1, c3)
In the report, I set the parameter (@parameter1) to 'Allow null value' and default value to null. The parameter will from another data set.
I want the report to run automatically with the default null value parameter. But now the report is still waiting for the parameter to be selected to run. Why? Or how to achieve what I want?
P.S
Also please find attached screen shots for the parameter and the query. This is not exactly the same as in the description because I was just trying to demonstrate the issue. But you get the idea.
The query:
select
t.a,
t.b
from
(
select 1 as a, 2 as b
union all
select 3 as a, 4 as b
) as t
where t.a =isnull( @p, t.a)