TdxReport.OnExport Event
Allows you to modify the report download target in the Report Viewer dialog or prevent users from downloading a report.
Declaration
property OnExport: TdxReportExportEvent read; write;
Remarks
Handle the OnExport event to execute custom code in response to a report download operation, modify the preview download 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
OnExportevent. AFileNameSpecifies the full absolute or relative path to the report download target.
You can assign a path to the target file to this parameter.
ACancelSpecifies if the download operation is canceled.
Assign
Trueto this parameter within anOnExportevent handler to prevent users from downloading a report file or to implement a custom report download operation.
Refer to the TdxReportExportEvent procedural type description for detailed information on all available options.