Cube: ICubeModelDestination;
The Cube property determines a source cube for a cube view.
Executing the example requires that the repository contains a virtual cube with the ViewCube identifier and a cube with the SourceCube identifier.
Sub UserProc;
Var
MB: IMetabase;
Cube: ICubeModel;
ViewCube: ICubeView;
FixInfo: ICubeDimensionFixInfo;
DimFix: ICubeDimensionFix;
i, c: Integer;
Begin
MB := MetabaseClass.Active;
ViewCube := MB.ItemById("ViewCube").Edit As ICubeView;
Cube := MB.ItemById("SourceCube").Bind As ICubeModel;
ViewCube.Cube := Cube.Destinations.DefaultDestination;
FixInfo := ViewCube.FixInfo;
c := FixInfo.Count;
For i := 0 To c - 1 Do
DimFix := FixInfo.Item(i);
DimFix.Fixed := True;
DimFix.Operation := BasicAggregatorOperation.Sum;
DimFix.Selection.SelectAll;
End For;
(ViewCube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the cube with the SourceCube identifier is set as a source cube for the cube view. All dimensions of the source cube are fixed.
See also: