AlternateSource: ICubeModelAlternateSource;
The AlternateSource property returns parameters of alternative cubes used for storing data. The property is relevant during the work with calculated cubes.
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 UserProc;
Var
MB: IMetabase;
Cube, Source: ICubeModel;
AltSource: ICubeModelAlternateSource;
Begin
MB := MetabaseClass.Active;
Cube := Mb.ItemById("CALC_CUBE").Edit As ICubeModel;
Source := Mb.ItemById("Source_1").Bind As ICubeModel;
AltSource := Cube.Destinations.DefaultDestination.AlternateSource;
AltSource.Source := Source.Destinations.DefaultDestination;
AltSource.UseStorage := True;
AltSource.AutoSaveToStorage := True;
AltSource.UseExecute := True;
(Cube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the Source_1 cubenis set as an alternative cube for the calculated cube. All data is automatically saved to the alternative cube and taken from it before the calculation.
See also: