views:

656

answers:

2

I have a simple ASP.NET web form with several ReportViewer controls running in local mode. Every time the page loads, each ReportViewer loads the report definition and also regenerates the dynamic expression_host assembly. This is obviously time consuming and will not scale very well. Is there any way to have the ReportViewer cache the report definition and the dynamic expression_host assemblies?

A: 

The problem is calling reset on the report viewr object. You will need to cache the report viewer.

Also call Clear on the report.localreport.dataset if you using objects as the data souce.

Ben Martin
Reset is not called; caching will be problematic as the data source instances will change between page lifecycles for each user (and across users). Clearing the data set has no effect and is not relevant to the problem.The most efficient solution was to remove any code from within the report itself to avoid the dynamic recompilation upon each new page request.
A: 

After trying a variety of methods, the best workaround to the issue so far has been to remove all code from within the report itself. After doing so, the request time has dramatically decreased.