Skip to main content

TCustomdxComponentPrinter.ExportToPDF(string,Boolean,TdxPSPDFReportExportOptions,TBasedxReportLink) Method

Exports a report generated by a specific report link to a PDF file.

Declaration

procedure ExportToPDF(const AFileName: string; ACanShowDialog: Boolean = True; ASettings: TdxPSPDFReportExportOptions = nil; AReportLink: TBasedxReportLink = nil); overload;

Parameters

Name Type
AFileName string
ACanShowDialog Boolean
ASettings TdxPSPDFReportExportOptions
AReportLink TBasedxReportLink

Remarks

The overloaded variants of this method do the following:

  • Make the report link passed as the AReportLink parameter active by assigning it to the CurrentLink property. If nil is passed as this parameter, the active link (and the CurrentLink property value) remains unchanged.

  • Export the active link’s report by calling the corresponding overloaded ExportToPDF method of the link and passing required parameters to it. Refer to the method description to learn about these parameters and export capabilities provided by this method.

In addition to the component printer’s ExportToPDF method, you can export reports to PDF files using the following methods:

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.

See Also