EventOnBeforeDeleteSheet (Args: IUiPrxSheetCancelEventArgs);
EventOnBeforeDeleteSheet (Args: Prognoz.Platform.Interop.Report.UiPrxSheetCancelEventArgs);
Args. The parameter, which enables the user to work with event parameters.
The EventOnBeforeDeleteSheet method implements the event that occurs before regular report sheet deletion.
The method enables to redefine the system event that occurs after the ReportEvents.OnBeforeDeleteSheet event.
Executing the example requires that the repository contains a regular report with connected module. The connected module and the Parent class must be specified as event handler.
Add links to the Report, Ui system assemblies.
Public Class EventsClass: Parent
Public Sub OnBeforeDeleteSheet(Sheet: IPrxSheet; Var Cancel: Boolean);
Begin
//Call system event redetermined in the Parent class
Inherited OnBeforeDeleteSheet(Sheet, Cancel);
End Sub OnBeforeDeleteSheet;
End Class EventsClass;
Public Class Parent: ReportEvents
//Redefine system event EventOnBeforeDeleteSheet
Public Sub EventOnBeforeDeleteSheet(Args: IUiPrxSheetCancelEventArgs);
Begin
WinApplication.InformationBox("Regular report sheet will be deleted");
End Sub EventOnBeforeDeleteSheet;
End Class Parent;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Ui;
Public Class EventsClass: Parent
Public Override Sub OnBeforeDeleteSheet(Sheet: IPrxSheet; Var Cancel: Boolean);
Begin
//Call system event redetermined in the Parent class
Inherited OnBeforeDeleteSheet(Sheet, Var Cancel);
End Sub OnBeforeDeleteSheet;
End Class;
Public Class Parent: PrxForeNetReportUserEventsClass
//Redefine system event EventOnBeforeDeleteSheet
Public Override Sub EventOnBeforeDeleteSheet(Args: Prognoz.Platform.Interop.Report.UiPrxSheetCancelEventArgs);
Var
WinAppCls: WinApplicationClass = New WinApplicationClassClass();
Begin
WinAppCls.InformationBox("Regular report sheet will be deleted", Null);
End Sub EventOnBeforeDeleteSheet;
End Class Parent;
After executing the example, before regular report sheet deletion the information message is deleted.
See. also: