This demo illustrates how to cache a large report document using a unique key, and then restore this document from the cache, when necessary. Unlike the Master-Detail Report demo from the Report Types section and the Document Map demo from the Web-specific Features section, this demo illustrates a more complex approach to caching documents.
When this application starts, report documents for all dictionaries (English.txt, German.txt and Italian.txt in the App_Data/Dictionaries directory) are generated in a separate thread, and then saved to a file on the disk.
NOTE: You can find this code in the Global.asax and CacheReportHelper.cs(vb) files.
Then, when a report document needs to be obtained (e.g. when a page within a ReportViewer is initially displayed, or when navigating to another report page), it is restored from a file on the disk using the ReportViewer.RestoreReportDocumentFromCache event.