Search code examples
cachingreporting-servicessubreport

How does ssrs cache reports that contain subreports


I'm trying to figure out how SSRS handles caching of subreports. The report I have has a lot going on: dynamic formatting, dynamic links, dynamic graphs, etc. Because of all this, it takes quite a while to load (about 10 seconds), and every time you click on something in the report, it has to reload everything (another 10 seconds). I looked into caching options, but the problem is I need the data shown in the graphs to be the live data (the rest of the report doesn't display any live data).

I came up with an idea to put the graphs in a subreport, so that I could cache the main report, and only the subreport would have to be reprocessed on every load. My thinking was that this would significantly cut down on the processing time for the whole report, and I could schedule the cache to be preloaded every night.

I know that Reporting Services isn't the ideal way to deliver this type of thing, and creating it as a website would yield much better performance, but my company wants to try and make it work with SSRS first.

Does anyone know if this would work? Does SSRS cache subreports separate from their parent reports, or would caching the parent report also cache the subreport?


Solution

  • Sub reports are processed at the same time as the main report you are calling, and you would need to setup caching on the main report to cache the contents of the sub report.

    For the components that do not require live data, you can cache shared datasets to improve report processing time. Seperate the data sources for the items that you need live data feeds from the items you can cache. https://msdn.microsoft.com/en-us/library/ee636149.aspx

    To open the Caching properties page for a shared dataset Open Report Manager, and locate the report for which you want to configure shared dataset properties: Point to the shared dataset, and click the drop-down arrow. In the drop-down list, click Manage. The General properties page for the report opens. Click the Caching tab.

    https://i.sstatic.net/vFHQP.png