Skip to main content
All docs
V23.2

DefaultReportDesignerContainer.UseAsyncEngine() Method

Allows you to use asynchronous interfaces and methods.

Namespace: DevExpress.XtraReports.Web.ReportDesigner

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

NuGet Package: DevExpress.Web.Reporting.Common

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.

Important

In asynchronous mode, you should use asynchronous interfaces and methods with the “Async” postfix instead of their counterparts.

Asynchronous mode does not guarantee that all services will call their asynchronous method implementations. If in your application you call the “synchronous” method counterpart, it may cancel asynchronous process execution, and subsequently reporting services start calling their synchronous method implementations.

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

 DevExpress.XtraReports.Web.ReportDesigner.DefaultReportDesignerContainer.UseAsyncEngine();
 // ...
 DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize();
 // ...

The UseAsyncEngine method must be called before the StaticInitialize() method.

View Example: 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

Report Wizard Customization Service

Method Async Counterpart
CustomizeReportTypeList CustomizeReportTypeListAsync
TryCreateCustomReport TryCreateCustomReportAsync
CustomizeReportOnFinish CustomizeReportOnFinishAsync
See Also