Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing a dataset to subreport in SSRS

I have a subreport that uses the same data as my main report. Right now, it populates its dataset by re-querying the database.

Is there a way to pass the data set to the subreport instead of creating the dataset again for the sub report,because this will improve the performance of the report.

Can i use shared dataset or the sub report will query the shared the dataset again ??

like image 364
Sally El-Sayed Avatar asked Dec 08 '13 12:12

Sally El-Sayed


People also ask

Can we use shared dataset with the subreport?

Shared datasets can be cached and scheduled by creating a cache refresh plan. Embedded datasets are defined in and used by a single report. If you want to use the same dataset to the main report in the subreport, you can make the dataset as a shared dataset.

How do you pass multiple value parameters to subreport in SSRS?

Use the JOIN function to combine all the values into a single string that you can pass. An expression that concatenates all the values in the array of a multivalued parameter of type String into one string.

How do you pass multiple values in one parameter Report Builder?

In the Report Data pane, expand the Parameters node, right-click the report parameter that was automatically created for the dataset parameter, and then click Parameter Properties. In the General tab, select Allow multiple values to allow a user to select more than one value for the parameter.


1 Answers

You should use a shared dataset and set it to cache. Then when the dataset is ran from the sub-report (assuming you use the same parameter values) it won't query the database again.

There is lots of information available regarding dataset caching, its benefits and usage cases.

http://technet.microsoft.com/en-us/library/ee636149.aspx

like image 94
Sam Avatar answered Oct 07 '22 16:10

Sam