ICalculatedCubeSources.Add

Syntax

Add(Source: ICubeModelDestination): ICalculatedCubeSource;

Parameters

Source. The cube that should be added to data sources of calculated cube.

Description

The Add method adds a data source to a calculated cube.

Example

Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier and a cube with the Cube_1 identifier, which will be added to data sources of calculated cube.

Sub UserProc;
Var
    MB: IMetabase;
    Cube: ICalculatedCube;
    Sources: ICalculatedCubeSources;
    CubeSource: ICubeModel;
Begin
    MB := MetabaseClass.Active;
    Cube := MB.ItemById("Calc_Cube").Edit As ICalculatedCube;
    CubeSource := MB.ItemById("Cube_1").Bind As ICubeModel;
    Sources := Cube.Sources;
    Sources.Add(CubeSource.Destinations.DefaultDestination);
    (Cube As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the specified cube is added to data sources of calculated cube.

See also:

ICalculatedCubeSources