The requested page is not available for the requested platform. You are viewing the content for Default platform.

WebDocumentViewerBuilder.Bind(String) Method

Retrieves a specified report from the report storage and binds it to the Web Document Viewer.

Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer

Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll


public WebDocumentViewerBuilder Bind(
    string reportUrl
Public Function Bind(
    reportUrl As String
) As WebDocumentViewerBuilder


Name Type Description
reportUrl String

The URL of the report to bind to the Document Viewer.


Type Description

A WebDocumentViewerBuilder that can be used to further configure the Document Viewer.


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


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

using DevExpress.XtraReports.Web.WebDocumentViewer;
public void ConfigureServices(IServiceCollection services) {
    services.AddSingleton<ICachedReportSourceWebResolver>(new CustomCachedReportSourceWebResolver());

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

Using this Bind 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, the 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 method. To use a DbDocumentStorage or a custom storage, register your IDocumentStorageProvider object.

See Also