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 ??
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With