IPrxSlice.GetRecentChanges

Fore Syntax

GetRecentChanges: IMatrix;

Fore.NET Syntax

GetRecentChanges: Prognoz.Platform.Interop.Matrix.IMatrix;

Description

The GetRecentChanges method returns a matrix of changed values of regular report slice.

Comments

Each time the regular report data is edited the method returns a new matrix that contains the current changes for the slice.

After report or area data is saved the method returns an empty matrix.

Fore Example

Executing the example requires a form, a button with the Button1 identifier on this form, 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 explorer must contain links to the 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(NullAs Iprxreport;
    UiReport1.Instance:= report;
End Sub OBJ46841FormOnShow;

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    m_s :IMatrix;
    Iter: IMatrixIterator;
Begin
    m_s:= report.DataSources.Item(0).Slices.Item(0).GetRecentChanges;
    Iter := m_s.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.

Fore.NET Example

Executing the example requires a form, a button with the Button1 identifier on this form, 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 explorer 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.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(NullAs Iprxreport;
    UiReportNet1.ReportUi.Instance:= report;
End Sub;
    
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    m_s: IMatrix;
    Iter: IMatrixIterator;
    report:IPrxReport;
Begin
    report:= UiReportNet1.ReportUi.Instance As Iprxreport;
    m_s:= report.DataSources.Item(0).Slices.Item(0).GetRecentChanges;
    Iter := m_s.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:

IPrxSlice