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

    Allows you to modify the report export target or prevent users from exporting a report.

    Declaration

    property OnExport: TdxReportControlExportEvent 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 TdxReportControl or Report Viewer UI (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 TdxReportControl and Report Viewer UI.

    Event Parameters

    The following parameters are available within an OnExport event handler:

    ASender
    Provides access to the TdxReportControl 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 TdxReportControlExportEvent procedural type description for detailed information on all available options.

    See Also