ReportBox.OnAfterObjectChange

Syntax

OnAfterObjectChange (Sender: Object; Args: IReportObjectChangeEventArgs);

OnAfterObjectChange (Sender: object; Args: Prognoz.Platform.Interop.Report.ReportObjectChangeEventArgs);

Parameters

Sender. The component that generated an event.

Args. Parameters of the object, in which an event occurred.

Description

The OnAfterObjectChange event occurs after object change.

Comments

Before object is changed, the OnBeforeObjectChange event occurs.

Example

Executing the example requires a form containing the ReportBox component named ReportBox1 and the UiReport component named UiReport1 which is a data source for ReportBox1. Set the OperationMode property of the UiReport1 component to Edit, the Active property to True. UiReport1 must contain loaded regular report with shapes on active sheet.

The specified procedure must be assigned by handler of the OnAfterObjectChange event for the ReportBox1 component.

Instead of the Fore components use Fore.NET analogs.

Add a link to the Metabase system assembly.

Sub ReportBox1OnAfterObjectChange(Sender: Object; Args: IReportObjectChangeEventArgs);
Begin
    Debug.WriteLine(
"Object was changed: " + Args.Object.Id +
        
" in report: " + Args.Report.Report.Object.Name + " from sheet: " + Args.Sheet.Name + " with the method:" + Args.Type.ToString);
End Sub ReportBox1OnAfterObjectChange;

Sub ReportBoxNet1OnAfterObjectChange(Sender: object; Args: Prognoz.Platform.Interop.Report.ReportObjectChangeEventArgs);
Begin
    System.Diagnostics.Debug.WriteLine(
"Object was changed: " + Args.Object.Id +
        
" in report: " + Args.Report.Report.Object.Name + " from sheet: " + Args.Sheet.Name + " with the method:" + Args.Type.ToString());
End Sub ReportBoxNet1OnAfterObjectChange;

After executing the example, after the object is resized, moved or rotated, the console will display a message containing object identifier and description of the executed operation, report name and sheet name with executed operation.

See also:

ReportBox