IEaxDataAreaHierarchies.Clear

Fore Syntax

Clear(Value: IDimSelection; Key: Integer);

Fore.NET Syntax

Clear(Value: Prognoz.Platform.Interop.Dimensions.IDimSelection; Key: uinteger);

Parameters

Value. Dimension selection where alternative hierarchy is placed.

Key. Dimension key.

Description

The Clear method removes collection of alternative hierarchies from specified dimension.

Comments

To clear collections from analytical data area, use IEaxDataAreaHierarchies.ClearAll.

To add alternative hierarchy to collection, use IEaxDataAreaHierarchies.Add.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. One of report dimensions must contain at least one alternative hierarchy.

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

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Hiers: IEaxDataAreaHierarchies;
    Slice: IEaxDataAreaSlice;
    DimSel: IDimSelection;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get data source slice
    Slice := Express.DataArea.Slices.Item(0);
    //Get dimension selection
    DimSel := Slice.Selection.Item(0);
    // Remove alternative hierarchy from dimension
    Hiers := Express.DataArea.Hierarchies;
    Hiers.Clear(DimSel, DimSel.Dimension.Key);
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example all alternative hierarchies will be removed from specified dimension.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Hiers: IEaxDataAreaHierarchies;
    Slice: IEaxDataAreaSlice;
    DimSel: IDimSelection;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
    // Get data source slice
    Slice := Express.DataArea.Slices.Item[0];
    //Get dimension selection
    DimSel := Slice.Selection.Item[0];
    // Remove alternative hierarchy from dimension
    Hiers := Express.DataArea.Hierarchies;
    Hiers.Clear(DimSel, DimSel.Dimension.Key);
    (Express As IMetabaseObject).Save();
End Sub;

See also:

IEaxDataAreaHierarchies