IEaxObjectSelection.Add

Syntax

Add(Value: IDimSelectionSet);

Parameters

Value. Added selection.

Description

The Add method adds the specified selection to the object selection.

Comments

To get selection corresponding to the selected area, use the IEaxObjectSelection.Item property.

Example

Executing the example requires that repository contains an express report with the EAX_SEL_MANAGER identifier.

Add links to the Dimensions, Express, Metabase, Pivot system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IEaxAnalyzer;
    SelManager: IEaxObjectSelectionManager;
    ObjSel: IEaxObjectSelection;
    PivotDims: IPivotDimensions;
    SelFactory: IDimSelectionSetFactory;
    SelSet: IDimSelectionSet;
    i: Integer;
    Sel: IDimSelection;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get express report
    Report := mb.ItemById("EAX_SEL_MANAGER").Edit 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;
    // Get dimensions used to build table
    PivotDims := Report.Pivot.Dimensions;
    // Create collection of selections
    SelFactory := New DimSelectionSetFactory.Create;
    SelSet := SelFactory.CreateDimSelectionSet;
    For i := 0 To PivotDims.Count - 1 Do
        Sel := SelSet.Add(PivotDims.Item(i).DimInstance);
        Sel.SelectElement(1False);
    End For;
    // Add custom selection to table selections
    ObjSel.Add(SelSet);
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the table selection corresponding to the selected areas will be added.

See also:

IEaxObjectSelection