Skip to main content

dxPSExportToPDFStream(TStream,TBasedxReportLink,Boolean,TdxPSPDFReportExportOptions) Method

Exports a specified report link‘s report as a PDF document to a stream.

Declaration

function dxPSExportToPDFStream(AStream: TStream; AReportLink: TBasedxReportLink; AShowSettingsDialog: Boolean = True; ASettings: TdxPSPDFReportExportOptions = nil): Boolean;

Parameters

Name Type
AStream TStream
AReportLink TBasedxReportLink
AShowSettingsDialog Boolean
ASettings TdxPSPDFReportExportOptions

Returns

Type
Boolean

Remarks

Call this global function and pass a destination stream and a source report link as the AStream and AReportLink parameters to export content as a PDF document. A dxPSExportToPDFStream function call invokes the “PDF Export Options” and “Save As” dialogs like dxPSExportToPDF does.

The dxPSExportToPDFStream function populates the “PDF Export Options” dialog according to the source report link’s active PDF export settings. You can pass an alternative source of default settings as the ADefaultSettings optional parameter or pass False as the AShowSettingsDialog optional parameter to export the source report without end-user interaction.

The dxPSExportToPDFStream 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.

See Also