ASPxWebDocumentViewer.OpenReport(String) Method

Opens the specified report in the ASPxWebDocumentViewer.

Namespace: DevExpress.XtraReports.Web

Assembly: DevExpress.XtraReports.v21.1.Web.WebForms.dll


public void OpenReport(
    string reportUrl


Name Type Description
reportUrl String

A String value specifying a report’s unique name.


A Document Viewer requests an appropriate CachedReportSourceWeb object to generate a report document by the specified report unique name, when required. The CachedReportSourceWeb object generates a report document caching each generated page. This consumes less memory in comparison to the document generation method used when a report instance is directly passed to the Document Viewer.

using DevExpress.XtraReports.Web    

Implement the ICachedReportSourceWebResolver interface to associate the specified unique report name with the CachedReportSourceWeb object that possesses the corresponding report. The following code demonstrates how to register a custom ICachedReportSourceWebResolver.

void Application_Start(object sender, EventArgs e) {
    DefaultWebDocumentViewerContainer.Register<ICachedReportSourceWebResolver, CustomCachedReportSourceWebResolver>();

If several OpenReport method calls are invoked one after another, the Document Viewer displays the report that is specified in the latest method call.

Using this OpenReport method overload allows the Document Viewer to regenerate documents when using their interactive features after the application pool has recycled, because the initial report can always be found.

By default, a CachedReportSourceWeb object caches a report document to the MemoryDocumentStorage. You can use a file, database or a custom storage instead so that the Document Viewer can recover its document from the storage after the application pool has recycled. Utilize a file storage by calling the UseFileDocumentStorage (.NET Framework) / UseFileDocumentStorage (.NET Core) method. To use a database or a custom storage, register your IDocumentStorageProvider object.


The CachedReportSourceWeb component cannot be associated with reports that include a PrintableComponentContainer.

See Also