All docs
V20.2
21.1 (EAP/Beta)
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DefaultWebDocumentViewerContainer.UseAsyncEngine() Method

Allows you to use asynchronous interfaces and methods.

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

Assembly: DevExpress.XtraReports.v20.2.Web.dll

Declaration

public static void UseAsyncEngine()

Remarks

The UseAsyncEngine method turns on asynchronous mode for the Web Document Viewer. It allows the application to access threads from the thread pool while reporting components load, save, or export reports. In asynchronous mode, you should use interfaces and methods with the “Async” postfix instead of their counterparts.

To switch to asynchronous mode, call the UseAsyncEngine method at the application startup:

 DevExpress.XtraReports.Web.WebDocumentViewer.DefaultWebDocumentViewerContainer.UseAsyncEngine();
NOTE

The complete sample project is available in the following DevExpress Examples repository on GitHub: How to Use the Asynchronous Engine for Web Reporting.

Asynchronous API

The following table lists interfaces and methods with their asynchronous counterparts:

Report Provider

A report provider creates or retrieves a report object based on the report identifier (report URL). When you implement a custom IReportProviderAsync service, use asynchronous methods. Note that in asynchronous mode, blocking requests use the IReportProvider service instead of the IReportProviderAsync service.

Interface Async Counterpart
IReportProvider IReportProviderAsync

Web Report Storage (ReportStorageWebExtension class)

If your application includes a web report storage, and you wish to use the asynchronous engine, implement the async equivalents of the ReportStorageWebExtension methods. Note that in asynchronous mode, blocking requests use methods without the Async postfix.

Method Async Counterpart
GetData GetDataAsync
none AfterGetDataAsync
GetUrls GetUrlsAsync
SetData SetDataAsync
SetNewData SetNewDataAsync

Report Model

Use async methods in controller actions to create a report model and pass it to the client.

Method Async Counterpart
WebDocumentViewerClientSideModelGenerator.GetModel WebDocumentViewerClientSideModelGenerator.GetModelAsync
ReportDesignerClientSideModelGenerator.GetModel ReportDesignerClientSideModelGenerator.GetModelAsync

Report

Method Async Counterpart
CreateDocument CreateDocumentAsync
ExportToCsv ExportToCsvAsync
ExportToDocx ExportToDocxAsync
ExportToHtml ExportToHtmlAsync
ExportToImage ExportToImageAsync
ExportToMail ExportToMailAsync
ExportToMht ExportToMhtAsync
ExportToPdf ExportToPdfAsync
ExportToRtf ExportToRtfAsync
ExportToText ExportToTextAsync
ExportToXls ExportToXlsAsync
ExportToXlsx ExportToXlsxAsync
Print PrintAsync

JSON Web Token Authentication

Interface Async Counterpart
IWebDocumentViewerExportResultUriGenerator IWebDocumentViewerExportResultUriGeneratorAsync
See Also