Value: Variant;
The Value property determines the changed value, which will be located in the cell after the event has been handled.
Executing the example requires that the repository contains a regular report.
Place on the form the UiReport, ReportBox components, two Label components named UiReport1, ReportBox1, Label1 and Label2, respectively.
For the UiReport component:
Select regular report in the Object property.
Set the Active property to True.
Set the OperationMode property to Edit.
For the ReportBox component select the UiReport1 component in the Report property.
Add links to the Forms, Report, and Tab system assemblies.
The example is a handler of the OnBeforeCellChange event for the ReportBox component.
Sub ReportBox1OnBeforeCellChange(Sender: Object; Args: IReportBeforeCellChangeEventArgs);
Var
Old_val, New_val: Variant;
Sheet: IPrxSheet;
SheetTab: IPrxTable;
Table: ITabSheet;
Begin
Sheet := Args.Sheet;
SheetTab := Sheet As IPrxTable;
Table := SheetTab.TabSheet;
Old_val := Table.CellValue(Args.Row, Args.Column);
New_val := Args.Value;
Label1.Text := New_val;
Label2.Text := Old_val;
End Sub ReportBox1OnBeforeCellChange;
After changing value of the A0 cell, the Label1 component will contain the old cell value, and the Label2 component will contain the new cell value.
See also: