TdxReport.ExportTo(TdxReportExportFormat,TStream,string) Method
Exports report content to a stream in any supported format.
Declaration
procedure ExportTo(AFormat: TdxReportExportFormat; AStream: TStream; out AFileName: string); overload;
Parameters
| Name | Type | Description |
|---|---|---|
| AFormat | TdxReportExportFormat | The target export format. Refer to the following section for details: Available Export Formats. |
| AStream | TStream | The target stream. |
| AFileName | string | Returns a string that consists of the ReportName property value and the file name extension associated with the target export format. |
Remarks
Call the ExportTo procedure to export report content to a stream in any supported format.
The ExportTimeout property allows you to set a timeout interval for export operations. If the specified timeout interval is reached, an exception is thrown.
Tip
The AFileName parameter is useful if you need to save target stream (AStream) content to a file after the export operation.
Available Export Formats
| AFormat Parameter Value | Content Format | Format-Specific Export Method |
|---|---|---|
| TdxReportExportFormat.CSV | Comma-Separated Values (CSV) | ExportToCSV |
| TdxReportExportFormat.DOCX | Office Open XML Document (DOCX) | ExportToDOCX |
| TdxReportExportFormat.HTML | Hypertext Markup Language (HTML) | ExportToHTML |
| TdxReportExportFormat.Image | The current image format (selected in the Report Designer dialog) | ExportToImage |
| TdxReportExportFormat.MHT | MIME HTML Document Format (MHT/MHTML) | ExportToMHT |
| TdxReportExportFormat.PDF | Portable Document Format (PDF) | ExportToPDF |
| TdxReportExportFormat.RTF | Rich Text Format (RTF) | ExportToRTF |
| TdxReportExportFormat.Text | Plain Text Format (TXT) | ExportToText |
| TdxReportExportFormat.XLS | Microsoft Excel® Binary Format (XLS) | ExportToXLS |
| TdxReportExportFormat.XLSX | Office Open XML Spreadsheet (XLSX) | ExportToXLSX |
Related Compiled Demo
To see the report export functionality in action, run the Report Designer/Viewer demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Select any demo in the sidebar on the left, click the Export button, and use any export option listed in the menu.
Tip
You can find full source code for the installed compiled Report demo in the following folder:
%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressReports\