This topic describes how you can create a report based on the grid control layout in a WinForms XAF application using Advanced Grid Printing and Exporting.
You can easily generate a report from the grid data either at design time or at runtime, taking into account the grid layout. The Reports V2 Module adds the New report item to the ExportController.ExportAction.
Internally, the New report item is added by handling the ExportController.ExportActionItemsCreated event from the WinGridReportExportController Controller.
The New report item invokes the Report Designer. The current grid layout is automatically converted to the report layout. You can learn more about the report generation rules and limitations in the Advanced Grid Printing and Exporting topic.
If you click Save, the report is saved to the application database, together with other user-defined reports.
By default, the report display name (see XtraReport.DisplayName) is set to the caption of the current View (see View.Caption). You can customize the display name by handling the WinGridReportExportController.QueryReportDisplayName event.
To adjust the report generation options, use the WinGridReportExportController.CustomizeReportGenerationOptions event.