Sub OnBeforeExportReport(Report: IPrxReport, Var Cancel: Boolean);
Begin
// set of operators
End Sub OnBeforeExportReport;
Report. Regular report that has generated the event.
Cancel. Parameter controlling export of regular report. When this parameter is set to True, the regular report is not exported, when it is set to False, the report is to be exported.
The OnBeforeExportReport method implements the event that occurs before export of the regular report.
On calling the OnBeforeExportReport method the kernel simultaneously handles the EventOnBeforeExportReport event, which can be redetermined if required:
The specified class is a handler of regular report events.
Class EventsClass: ReportEvents
Public Sub OnBeforeExportReport(Report: IPrxReport; Var Cancel: Boolean);
Var
RS: IPrxSheet;
Begin
//Call system event redetermined in Parent class
RS := Report.ActiveSheet;
Report.ActiveSheet.Printable := False;
End Sub OnBeforeExportReport;
Public Sub OnAfterExportReport(Report: IPrxReport);
Var
RS: IPrxSheet;
Begin
//Call system event redetermined in Parent class
RS := Report.ActiveSheet;
Report.ActiveSheet.Printable := True;
End Sub OnAfterExportReport;
End Class EventsClass;
On occurrence of the OnBeforeExportReport event the active page of the regular report is hidden for printing (including export to PDF). After export the page is opened again.
See also: