IEaxDataAreaHierarchies.Add

Syntax

Add(Slice: IEaxDataAreaSlice;

    DS: IDimSelection;

    Key: Integer;

    [ElementsToCopy: IDimSelection = Null]): IEaxDataAreaHierarchy;

Parameters

Slice. Analytical data area slice.

DS. Dimension selection.

Key. Dimension key.

ElementsToCopy. Selection where elements of current selection will be added. Optional parameter, to ignore use Null.

Description

The Add method adds new alternative hierarchy in collections.

Comments

To clear collection of alternative hierarchies, use IEaxDataAreaHierarchies.Clear or IEaxDataAreaHierarchies.ClearAll.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table.

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

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    DArea: IEaxDataArea;
    Slice: IEaxDataAreaSlice;
    DimSel: IDimSelection;
    Hiers: IEaxDataAreaHierarchies;
    Hier: IEaxDataAreaHierarchy;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get data source slice
    DArea := Express.DataArea;
    Slice := DArea.Slices.Item(0);
    //Get dimension selection
    DimSel := Slice.Selection.Item(0);
    // Create new alternative hierarchy of analytical data area
    Hiers := DArea.Hierarchies;
    Hier := Hiers.Add(Slice, DimSel, DimSel.Dimension.Key);
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example alternative hierarchy is created in express report.

See also:

IEaxDataAreaHierarchies