ICubeSelectionControlItem.ControllingDim

Fore Syntax

ControllingDim: IDimensionModel;

Fore Syntax

ControllingDim: Prognoz.Platform.Interop.Dimensions.IDimensionModel;

Description

The ControllingDim property returns the controlling cube dimension.

Fore Example

Executing the example requires that the repository contains a standard cube with the CUBE_OBJ identifier, which contains a parametric dictionary with the UNITS identifier as a dimension in cube dimensions.

To execute the example, add links to the Metabase, Cubes and Dimensions system assemblies.

Sub Main;
Var
    Mb: IMetabase;
    Cube: ICubeModel;
    ControllingDim: IDimensionModel;
    selItem: ICubeSelectionControlItem;
Begin
    Mb := MetabaseClass.Active;
    Cube := Mb.ItemById("CUBE_OBJ").Edit As ICubeModel;
    ControllingDim := Cube.Destinations.DefaultDestination.Dimensions.FindById("UNITS");
    selItem := Cube.SelectionControl.Item(0);
    selItem.ControllingDim := ControllingDim;
    selItem.Expression.AsString := "FIRST.Key";
    selItem.SelectionStrategy := CubeSelectionControlStrategy.SelectFirst;
    (Cube As IMetabaseObject).Save;
End Sub Main;

After executing the example the following will be determined for the first dimension: a dictionary with the UNITS identifier, the FIRST.Key control expression and the Select the First Element control strategy.

Fore.NET Example

Executing the example requires that the repository contains a standard cube with the CUBE_OBJ identifier, which contains a parametric dictionary with the UNITS identifier as a dimension in cube dimensions.

To execute the example, add links to the Metabase, Cubes and Dimensions system assemblies.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
...
Public Class Program
...
Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    Cube: ICubeModel;
    ControllingDim: IDimensionModel;
    selItem: ICubeSelectionControlItem;
Begin
    Mb := Params.Metabase;
    Cube := Mb.ItemById["OBJ2407"].Edit() As ICubeModel;
    ControllingDim := Cube.Destinations.DefaultDestination.Dimensions.FindById("UNITS");
    selItem := Cube.SelectionControl.Item[0];
    selItem.ControllingDim := ControllingDim;
    selItem.Expression.AsString := "FIRST.Key";
    selItem.SelectionStrategy := CubeSelectionControlStrategy.cscsSelectFirst;
    (Cube As IMetabaseObject).Save();
    End Sub;
End Class;

After executing the example the following will be determined for the first dimension: a dictionary with the UNITS identifier, the FIRST.Key control expression and the Select the First Element control strategy.

See also:

ICubeSelectionControlItem