3
votes

I have an SSRS report which have two datasets. One Dataset for showing the Amount of purchase in detail level for All Region Managers & other dataset is for displaying amount of purchase for individual manager. If the user select all managers as input, the report displays data from both datasets. If the user select a single manager, Detail level information will be hidden and data for that manager alone will be displayed ( Handled this by creating visibility expression in dataset). But whenever the report exectuted stored prcoedures for both datasets called. Is it possible to configure the execution of report dataset based on parameter values?

for e.g : In dataset1 properites I gave below expression,

=iif(Parameters!ManagerID.Value= -1,exec procedure1 ,0)

But it gave me error. How to make a dataset execute based on a parameter value?

1
How about pass the parameter into stored procedures (in case it not a shared dataset)? So that you can check the parameter in sp and return empty datasetPrisoner

1 Answers

2
votes

Use an 'if' condition in both data sets. For example:

if @parameter = 'A'
...query....
else 
select 1

And for the tablix, use visibility expression to hide based on the parameter va.