Skip to main content
All docs
V26.1
  • TdxReport.OnExport Event

    Allows you to modify the report export target in the Report Viewer dialog or prevent users from exporting a report.

    Declaration

    property OnExport: TdxReportExportEvent read; write;

    Remarks

    Handle the OnExport event to execute custom code in response to a report export operation, modify the preview export target, replace the built-in Save As dialog, or prevent the operation depending on specific conditions in your application.

    Event Occurrence

    The OnExport event occurs every time a user attempts to export a report in the Report Viewer dialog (in any available format). If the OnExport event is unhandled, all export commands display the Save As dialog.

    Tip

    You can use the ExportFormats property to change the list of target export formats available in the Report Viewer dialog.

    Event Parameters

    The following parameters are available within an OnExport event handler:

    ASender
    Provides access to the TdxReport component that raised the OnExport event.
    AFileName

    Specifies the full absolute or relative path to the report export target.

    You can assign a path to the target file to this parameter.

    ACancel

    Specifies if the export operation is canceled.

    Assign True to this parameter within an OnExport event handler to prevent users from exporting a report file or to implement a custom report export operation.

    Refer to the TdxReportExportEvent procedural type description for detailed information on all available options.

    See Also