Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxReportViewer.ExportToAsync(ExportFormat) Method

Asynchronously exports the document to a file in the specified format.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v24.2.Viewer.dll

NuGet Package: DevExpress.Blazor.Reporting.Viewer

#Declaration

public override Task ExportToAsync(
    ExportFormat format
)

#Parameters

Name Type Description
format ExportFormat

An enumeration member that specifies the format of the exported file.

#Returns

Type Description
Task

An asynchronous operation that exports the document to a file.

#Remarks

Use this method to export a document to a file. The file name is the report’s Name property value. You can use the XtraReport.ExportOptions property to specify export options for the report.

The following code exports a document to a file in XLSX format:

await reportViewer.ExportToAsync(DevExpress.XtraPrinting.ExportFormat.Xlsx);

For more information on document export, review the following help topic: Document Export Overview.

See Also