ICustomDimAttribute.HasHierarchy

Fore Syntax

HasHierarchy: Boolean;

Fore.NET Syntax

HasHierarchy: boolean;

Description

The HasHierarchy property determines whether attribute is used as alternative hierarchy.

Comments

Available values:

Fore Example

Executing the example requires that repository contains cube with the CUBE_SEP_PARAMS identifier. Determine list of facts and its hierarchy for cube without using existing dictionary.

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

Sub UserProc;
Var
    mb: IMetabase;
    cube: IStandardCube;
    customdim: ICustomDimension;
    attrs: ICustomDimAttributes;
    attr: ICustomDimAttribute;
Begin
    // Get repository
    mb := MetabaseClass.Active;
    // Get cube
    cube := mb.ItemById("CUBE_SEP_PARAMS").Edit As IStandardCube;
    // Get facts dimension
    customdim := cube.FactDimension.Dimension As ICustomDimension;
    // Get collection of dimension attributes
    attrs := customdim.Attributes;
    // Get the Order facts dimension attribute
    attr := attrs.Order;
    // Set attribute as alternative hierarchy
    attr.HasHierarchy := True;
    // Save changes
    (customDim As IMetabaseObject).Save;
End Sub UserProc;

After executing the example facts dimension will be used as alternative hierarchy.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Cubes;
Imports
 Prognoz.Platform.Interop.Dimensions;

Public
 Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    cube: IStandardCube;
    customdim: ICustomDimension;
    attrs: ICustomDimAttributes;
    attr: ICustomDimAttribute;
Begin
    // Get repository
    mb := Params.Metabase;
    // Get cube
    cube := mb.ItemById["CUBE_SEP_PARAMS"].Edit() As IStandardCube;
    // Get facts dimension
    customdim := cube.FactDimension.Dimension As ICustomDimension;
    // Get collection of dimension attributes
    attrs := customdim.Attributes;
    // Get the Order facts dimension attribute
    attr := attrs.Order;
    // Set attribute as alternative hierarchy
    attr.HasHierarchy := True;
    // Save changes
    (customDim As IMetabaseObject).Save();
End Sub;

See also:

ICustomDimAttribute