Skip to main content
A newer version of this page is available. .
All docs
V21.2

DxReportViewer.ExportToAsync(ExportFormat) Method

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

Namespace: DevExpress.Blazor.Reporting

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

NuGet Package: DevExpress.Blazor.Reporting.Viewer

Declaration

public 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