IEaxObjectSelection.Matrix

Fore Syntax

Matrix: IMatrix;

Fore.NET Syntax

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

Description

The Matrix property returns data matrix corresponding to the areas selected in the object.

Comments

To get selection corresponding to all areas selected in the object, use the IEaxObjectSelection.Combined property.

Fore Example

Executing the example requires that repository contains express report with the EAX_SEL_MANAGER identifier. This report should contain the table with several selected areas.

Add links to the Express, Matrix, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IEaxAnalyzer;
    SelManager: IEaxObjectSelectionManager;
    ObjSel: IEaxObjectSelection;
    Matrix: IMatrix;
    Iter: IMatrixIterator;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get express report
    Report := mb.ItemById("EAX_SEL_MANAGER").Bind As IEaxAnalyzer;
    // Get object to work with selection used to build data table
    SelManager := Report.Grid.SelectionManager;
    // Get selection in the table
    ObjSel := SelManager.Selection;
    If ObjSel.Count > 0 Then
        // Display data corresponding to areas selected in the table
        Matrix := ObjSel.Matrix(ObjSel.Item(0));
        Iter := Matrix.CreateIterator;
        Iter.Move(IteratorDirection.First);
        While Iter.Valid Do
            Debug.WriteLine(Iter.Value);
            Iter.Move(IteratorDirection.Next);
        End While;
    End If;
End Sub UserProc;

After executing the example the console displays data corresponding to the areas selected in the table.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Matrix;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Report: IEaxAnalyzer;
    SelManager: IEaxObjectSelectionManager;
    ObjSel: IEaxObjectSelection;
    Matrix: IMatrix;
    Iter: IMatrixIterator;
Begin
    // Get current repository
    mb := Params.Metabase;
    // Get express report
    Report := mb.ItemById["EAX_SEL_MANAGER"].Bind() As IEaxAnalyzer;
    // Get object to work with selection used to build data table
    SelManager := Report.Grid.SelectionManager;
    // Get selection in the table
    ObjSel := SelManager.Selection[True];
    If ObjSel.Count > 0 Then
        // Display data corresponding to areas selected in the table
        Matrix := ObjSel.Matrix[ObjSel.Item[0]];
        Iter := Matrix.CreateIterator();
        Iter.Move(IteratorDirection.itdFirst);
        While Iter.Valid Do
            System.Diagnostics.Debug.WriteLine(Iter.Value);
            Iter.Move(IteratorDirection.itdNext);
        End While;
    End If;
End Sub;

See also:

IEaxObjectSelection