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

    Allows you to modify the dashboard export target or prevent users from exporting dashboard content.

    Declaration

    property OnExport: TdxDashboardExportEvent read; write;

    Remarks

    Handle the OnExport event to run custom code when dashboard content is exported. Change the export target, replace the built-in Save As dialog, or cancel the operation based on application-specific conditions.

    Event Occurrence

    The OnExport event occurs every time a user attempts to export dashboard content using the Export To button within the Dashboard Viewer or Dashboard Designer dialog (in any available format).

    VCL Dashboards: An "Export Formats" Menu Example in the Dashboard Viewer Dialog

    If the OnExport event is unhandled, a click on the Export button in the Export To dialog displays the standard Save As dialog.

    VCL Dashboards: Image Export Settings

    Event Parameters

    The following parameters are available within an OnExport event handler:

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

    Specifies the full absolute or relative path to the dashboard 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 dashboard file or to implement a custom dashboard export operation.

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

    See Also