TBasedxReportLink.ExportToPDF(string,Boolean,TdxPSPDFReportExportOptions) Method
Exports a report to a PDF file.
Declaration
procedure ExportToPDF(const AFileName: string; ACanShowDialog: Boolean = True; ASettings: TdxPSPDFReportExportOptions = nil); overload;
Parameters
Name | Type |
---|---|
AFileName | string |
ACanShowDialog | Boolean |
ASettings | TdxPSPDFReportExportOptions |
Remarks
The first overloaded variant calls the dxPSExportToPDF global function and passes the current report link as its parameter. This function allows end-users to fine-tune export results via the built-in PDF Export Options and Save As dialogs.
The second overloaded variant of this method allows you to specify the name and location of the resulting PDF file via the AFileName parameter, and provide initial option values for the PDF Export Options dialog via the ASettings parameter. If this parameter is not specified, options will be initialized with the default values assigned via the report link’s PDFExportOptions property. You can also opt to not display the PDF Export Options and Save As dialogs to end-users by passing False as the ACanShowDialog parameter.
In addition to the report link ExportToPDF method, you can export reports to PDF files using the following methods:
The component printer’s ExportToPDF method;
The dxPSExportToPDF, dxPSExportToPDFFile, and dxPSExportToPDFStream global functions defined in the dxPSPDFExport unit.
Handle the component printer’s OnBeforeExportToPDF event to dynamically adjust PDF export settings before a report is exported to a PDF file or optionally cancel the export.
For more information about available PDF export options and how to programmatically export to PDF files, refer to the How to Export Reports to PDF Files topic.