CreateExecutorO(Options: Integer): ICubeInstanceDestinationExecutor;
Options. Cube calculation parameters.
The CreateExecutorO method creates an object that calculates output cube matrix with the use of parameters.
As a value of the Options parameter, specify a value or a combination of values of the CubeInstanceDestinationExecutorOptions enumeration.
Executing the example requires that the repository contains a cube with the CUBE identifier.
Add links to the Cubes, Dimensions, Matrix, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
CubeInst: ICubeInstance;
DefDest: ICubeInstanceDestination;
SelSet: IDimSelectionSet;
i: integer;
DestExec: ICubeInstanceDestinationExecutor;
Proxy: IMatrix;
Iter: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
CubeInst := MB.ItemById("CUBE").Open(Null) As ICubeInstance;
DefDest := CubeInst.Destinations.DefaultDestination;
SelSet := DefDest.CreateDimSelectionSet;
For i := 0 To SelSet.Count - 1 Do
SelSet.Item(i).SelectAll;
End For;
Debug.WriteLine("---------------Values-------------------");
DestExec := DefDest.CreateExecutorO(CubeInstanceDestinationExecutorOptions.MatrixProxy);
DestExec.PrepareExecute(SelSet);
DestExec.PerformExecute(False);
Proxy := DestExec.Matrix;
Iter := Proxy.CreateIterator;
Iter.Move(IteratorDirection.First);
i := 0;
While Iter.Valid Do
Debug.WriteLine(i.ToString + " Iter.Value = " + Iter.Value);
Iter.Move(IteratorDirection.Next);
i := i + 1;
End While;
End Sub UserProc;
After executing the example the ADOMD cube is calculated. The dimension selection for calculation is created as follows:
The DATE and TERRITORY dimensions are located by rows and columns, respectively. All elements are selected in the dimensions:
All other dimensions are included into fixed, the first element is selected by them.
During calculation, fixed dimensions are excluded from the output matrix. Calculation results are displayed in the development environment console.
See also: