IEaxObjectSelectionManager.Selection

Syntax

Selection([Update: Boolean = True]): IEaxObjectSelection;

Parameters

Update. Attribute that selection will be changed.

Description

The Selection property returns object selection.

Comments

Object selection is used to get dimension selection corresponding to the selection of areas in the object.

Available values of the Update parameter:

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 Dimensions, Express, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IEaxAnalyzer;
    SelManager: IEaxObjectSelectionManager;
    ObjSel: IEaxObjectSelection;
    i, j: Integer;
    SelSet: IDimSelectionSet;
    Sel: IDimSelection;
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 selection corresponding to areas selected in the table
        For i := 0 To ObjSel.Count - 1 Do
            Debug.WriteLine("Selection set " + (i + 1).ToString);
            Debug.Indent;
            SelSet := ObjSel.Item(i);
            For j := 0 To SelSet.Count - 1 Do
                Sel := SelSet.Item(j);
                Debug.WriteLine("Dimension selections '" + Sel.Dimension.Name + "'");
                Debug.Indent;
                Debug.WriteLine(Sel.ToString);
                Debug.Unindent;
            End For;
            Debug.Unindent;
            Debug.WriteLine("");
        End For;
        // Display spliced selection corresponding to all areas selected in the table
        Debug.WriteLine("Spliced set of selections");
        Debug.Indent;
        SelSet := ObjSel.Combined;
        For j := 0 To SelSet.Count - 1 Do
            Sel := SelSet.Item(j);
            Debug.WriteLine("Dimension selection '" + Sel.Dimension.Name + "'");
            Debug.Indent;
            Debug.WriteLine(Sel.ToString);
            Debug.Unindent;
        End For;
        Debug.Unindent;
    End If;
End Sub UserProc;

After executing the example, the console window displays selection corresponding to each selected area in the table and selection corresponding to all selected areas in the table.

See also:

IEaxObjectSelectionManager