public class CachedReportSourceWeb :
Public Class CachedReportSourceWeb
Use the CachedReportSourceWeb object to display a report in a Document Viewer. This object creates a report document and caches each generated page to a storage. Only pages displayed in a Document Viewer are stored in memory.
Pass a target report as a parameter to the CachedReportSourceWeb object's constructor.
Use the OpenReport(String) (WebForms)) / Bind(String) (MVC) / Bind(String) (ASP.NET Core MVC) method to bind the Document Viewer to a report by the unique report name. Implement the ICachedReportSourceWebResolver interface to associate a report's unique name with the CachedReportSourceWeb object that owns the report. A Document Viewer uses the ICachedReportSourceWebResolver object to find an appropriate CachedReportSourceWeb object by a report's unique name and requests the found object to generate a report document, when required.
You can also use the OpenReport(CachedReportSourceWeb) (WebForms) / Bind(CachedReportSourceWeb) (MVC) method to directly bind a Document Viewer to the CachedReportSourceWeb object that owns a report . However, the report's interactive features are only available to users until the application pool is recycled. The document needs to be regenerated to make interactive features available. However, after the application pool is recycled, the document cannot be regenerated, because the initial report cannot be found.
When you use the CachedReportSourceWeb component to generate a report document, the PrintOnPage event is raised each time a page with the current control is created. In this connection, the total number of pages is unknown at the moment the event fires and you cannot use the PageCount property in the event handler.
When you create a report document, the CachedReportSourceWeb component generates information for a single-file export. This increases memory consumption. Disable the AllowSingleFileExport option if you do not plan to export the generated document in single-file mode.