Files to look at:
DataGrid for Blazor - WebAssembly application - How to implement the exporting functionality using DevExpress Reporting tools
This example illustrates how to use DevExpress Reporting tools to export DxDataGrid content to different formats (.pdf/.xlsx/.docx) in the Blazor WebAssembly application.
In this example, DataGrid is bound to the external Web API service using the CustomData property. This Web API service’s source code is located in this folder. The database is "Northwind", and its script generation file can be found in this folder. Generate this data on your SQL server and change the connection string in this file correspondingly (see the OnConfiguring method).
The export buttons are located within the ExportButtons components. Each of them contains a URI to a specific ExportedDocument controller method in the mentioned Web API service. This URI contains DataGrid's options, so the created report will only contain data, which is displayed in the grid after sorting and filtering are applied.
The ReportHelper.CreateReport method is used to create a report that is exported to the file of the corresponding type using the ExportToPdf(String)/ExportToXlsx(Stream)/ExportToDocx(Stream) method.
See also:
How to use DevExpress Reporting Components in Blazor applications