ICubeModelAlternateSource.Source

Syntax

Source: ICubeModelDestination;

Description

The Source property determines a cube used as an alternative data source.

Example

Executing the example requires a calculated cube with the CALC_CUBE identifier and a cube with the Source_1 identifier that is used as an alternative data source.

Sub Main;

Var

MB: IMetabase;

Cube, Source: ICubeModel;

AltSource: ICubeModelAlternateSource;

MObj: IMetabaseObject;

Begin

MB := MetabaseClass.Active;

MObj := Mb.ItemById("CALC_CUBE").Edit;

Source := Mb.ItemById("Source_1").Bind As ICubeModel;

Cube := MObj As ICubeModel;

AltSource := Cube.Destinations.DefaultDestination.AlternateSource;

AltSource.Source := Source.Destinations.DefaultDestination;

AltSource.UseStorage := True;

AltSource.AutoSaveToStorage := True;

AltSource.UseExecute := True;

MObj.Save;

End Sub Main;

After executing the example the Source_1 cube is set as an alternative cube for the cube that is calculated with the CALC_CUBE identifier. All data is automatically saved to the alternative cube and taken from it before the calculation.

See also:

ICubeModelAlternateSource