IStandardCubeRelations.Add

Syntax

Add: IStandardCubeRelation;

Description

The Add method adds a new relation to a standard cube.

Example

Executing the example requires a standard cube with the Stan_Cube identifier. The cube contains a calendar dimension with the CALENDAR identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

StandCub: IStandardCube;

Relat: IStandardCubeRelation;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Stan_Cube").Edit;

StandCub := MObj As IStandardCube;

Relat := StandCub.Relations.Add;

Relat.Id := "BEFORE_DOWN";

Relat.Name := One point back and down shift;

Relat.Relation(StandCub.Dimensions.FindById("CALENDAR")).AsString := "T.UP.UP";

MObj.Save;

End Sub Main;

After executing the example a new relation is created for calendar cube dimension in a standard cube. If this relation is used in calculated cube facts, the element located two levels up is selected.

See also:

IStandardCubeRelations