dxPSExportToPDF(TBasedxReportLink) Method
Exports a specified report link‘s report as a PDF document.
Declaration
function dxPSExportToPDF(AReportLink: TBasedxReportLink): Boolean;
Parameters
Name | Type |
---|---|
AReportLink | TBasedxReportLink |
Returns
Type |
---|
Boolean |
Remarks
Call this function and pass a source report link as a parameter to export the report to a PDF file. A dxPSExportToPDF function call invokes the built-in “PDF Export Options” dialog populated according to the report link’s active PDF Export settings.
A click on the OK button confirms selected export settings and invokes the “Save As” dialog to allow users to select the name and location for an exported PDF file. The “Save As” dialog offers the default file name retrieved from the target report link’s PDFExportOptions.DefaultFileName property.
A click on the OK button exports the report to a PDF file. The dxPSExportToPDF function returns False if one of the following conditions is met:
A user closes the “PDF Export Options” or “Save As” dialog without confirmation.
A report export operation fails for any reason.
Otherwise – the function returns True.
Note
You can handle the component printer‘s OnBeforeExportToPDF event to cancel the pending PDF export operation under specific circumstances or override its settings before the operation starts.