GetRecentChanges: IMatrix;
GetRecentChanges: Prognoz.Platform.Interop.Matrix.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, and ForeSystem.
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.
Executing the example requires a form, a button with the Button1 identifier placed on it, the ReportBoxNet component, and the UiReportNet component named UiReportNet1, that is used as a data source for ReportBoxNet, and a regular report with the Rep_1 identifier. The assembly inspector must contain links to the system assemblies: Report, Forms, Matrix, and ForeSystem.
The example is a handler of the Click event for a button.
Imports Prognoz.Platform.Forms.NET;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Forms;
Imports Prognoz.Platform.Interop.Matrix;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports System.Diagnostics;
...
Private Sub OBJ46886Form_Shown(sender: System.Object; e: System.EventArgs);
Var
mb:IMetabase;
report:IPrxReport;
Begin
mb:= Self.Metabase;
report:= mb.ItemById["Rep_1"].Open(Null) As Iprxreport;
UiReportNet1.ReportUi.Instance:= report;
End Sub;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
m_di: IMatrix;
Iter: IMatrixIterator;
report: IPrxReport;
Begin
report:= UiReportNet1.ReportUi.Instance As Iprxreport;
m_di:= report.DataIslands.Item[0].GetRecentChanges();
Iter := m_di.CreateIterator();
Iter.Move(IteratorDirection.itdFirst);
While Iter.Valid Do
System.Diagnostics.Debug.Write(Iter.Value + " ");
Iter.Move(IteratorDirection.itdNext);
End While;
End Sub;
After executing the example on editing the data and clicking the button the changed values are displayed in the console.
See also: