GetRecentChanges: IMatrix;
The GetRecentChanges method returns a matrix of changed values of the regular report data area.
Each time after the regular report data is changed, the method returns a new matrix that contains current changes for the data area.
After report or area data is saved the method returns an empty matrix.
Executing the example requires a form, a button with the Button1 identifier placed on it, the ReportBox component, and the UiReport component named UiReport1, that is used as a data source for ReportBox, and a regular report with the Rep_1 identifier. The assembly inspector must contain links to the following system assemblies: Report, Metabase, Forms, Matrix.
The example is a handler of the OnClick event for a button.
Sub OBJ46841FormOnShow(Sender: Object; Args: IEventArgs);
Begin
mb:= MetabaseClass.Active;
report:= mb.ItemById("Rep_1").Open(Null) As Iprxreport;
UiReport1.Instance:= report;
End Sub OBJ46841FormOnShow;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
m_di: IMatrix;
Iter: IMatrixIterator;
Begin
m_di:= report.DataIslands.Item(0).GetRecentChanges;
Iter := m_di.CreateIterator;
Iter.Move(IteratorDirection.First);
While Iter.Valid Do
Debug.Write(Iter.Value + " ");
Iter.Move(IteratorDirection.Next);
End While;
End Sub Button1OnClick;
After executing the example on editing the data and clicking the button the changed values are displayed in the console.
See also: