DataGrid for Blazor - How to use DevExpress Reporting tools to implement export in a server application
The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.
This example illustrates how to use DevExpress Reporting tools to export Data Grid's content to different file formats (.pdf/.xlsx/.docx) in a Blazor Server application.
To export information, apply the ExportMiddleware type to the application request pipeline. The ExportMiddleware handles requests. The response returns the file of the corresponding type.
The ExportButtons component contains export buttons. Each export button contains an URI to this project, and the URI contains the Data Grid options. The created report contains only data that is visible in the grid after sort and filter operations. The ExportMiddleware processes the request with the URI.
Use the ReportHelper.CreateReport method with the ExportToPdf(String)/ExportToXlsx(Stream)/ExportToDocx(Stream) methods to create a report that is exported to the file of the corresponding type.
How to use DevExpress Reporting Components in Blazor applications