Passing a dataset to subreport in SSRS

reporting-services, ssrs-2008

Solution

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

Problem

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 ??

Original source