EventOnBeforeChangeControlValue (Args: IUiPrxControlCancelEventArgs);
EventOnBeforeChangeControlValue (Args: Prognoz.Platform.Interop.Report.UiPrxControlCancelEventArgs);
Args. The parameter, which enables the user to work with event parameters.
The EventOnBeforeChangeControlValue method implements the event that occurs before the value of a regular report control is changed.
The method enables to redefine the system event that occurs after the ReportEvents.OnBeforeChangeControlValue 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 OnBeforeChangeControlValue(Control: IPrxControl; Var Cancel: Boolean);
Begin
//Call system event redetermined in the Parent class
Inherited OnBeforeChangeControlValue(Control, Cancel);
End Sub OnBeforeChangeControlValue;
End Class EventsClass;
Class Parent: ReportEvents
// Handle the EventOnBeforeChangeControlValue event
Public Sub EventOnBeforeChangeControlValue(Args: IUiPrxControlCancelEventArgs);
Begin
WinApplication.InformationBox("Control value will be changed");
End Sub EventOnBeforeChangeControlValue;
End Class Parent;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Ui;
Public Class EventsClass: Parent
Public Override Sub OnBeforeChangeControlValue(Control: IPrxControl; Var Cancel: Boolean);
Begin
//Call system event redetermined in the Parent class
Inherited OnBeforeChangeControlValue(Control, Var Cancel);
End Sub OnBeforeChangeControlValue;
End Class;
Public Class Parent: PrxForeNetReportUserEventsClass
//Redefine the EventOnBeforeChangeControlValue system event
Public Override Sub EventOnBeforeChangeControlValue(Args: Prognoz.Platform.Interop.Report.UiPrxControlCancelEventArgs);
Var
WinAppCls: WinApplicationClass = New WinApplicationClassClass();
Begin
//Handle system event
WinAppCls.InformationBox("Control value will be changed", Null);
End Sub EventOnBeforeChangeControlValue;
End Class Parent;
After executing the example, before control value changes, the information message is displayed in regular report.
See. also: