UseDataTypes: Boolean;
The UseDataTypes property determines whether information about the way of data generation in the cell will be added on calculation.
Available values:
True. Create information about how data appeared in the cell. After calculation, the information will be available in the ICubeExecuteResult.DataTypes property.
False. Default value. Do not create information about how data appeared in the cell.
NOTE. Getting information about how data is created in the cells is not supported on working with automatic and calculated cubes.
Executing the example requires a standard cube with the STD_CUBE identifier. The aggregation by any dimension is set up in the cube.
Add links to the Cubes, Dimensions, Matrix, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
CubeInst: ICubeInstance;
Dest: ICubeInstanceDestination;
Sels: IDimSelectionSet;
Sel: IDimSelection;
Exec: ICubeInstanceDestinationExecutor;
Matr: IMatrix;
Begin
// Open cube
MB := MetabaseClass.Active;
CubeInst := MB.ItemById("STD_CUBE").Open(Null) As ICubeInstance;
Dest := CubeInst.Destinations.DefaultDestination;
// Set selection
Sels := Dest.CreateDimSelectionSet;
For Each Sel In Sels Do
Sel.SelectAll;
End For;
// Set support for working with information about how data is generated in cells
(Sels As ICubeExecuteSetup).UseDataTypes := True;
Exec := Dest.CreateExecutor;
// Calculate cube
Exec.PrepareExecute(Sels);
Exec.PerformExecuteO(CubeInstanceDestinationExecutorOptions.None);
Matr := Exec.Matrix;
ShowMatrix("Cube matrix", Matr);
End Sub UserProc;
Sub ShowMatrix(Title: String; Matr: IMatrix);
Var
Iter: IMatrixIterator;
CubeExecRes: ICubeExecuteResult;
CubeDataTyp: ICubeExecuteDataTypes;
S: String;
Coord: IMatrixCoord;
Begin
CubeExecRes := Matr As ICubeExecuteResult;
CubeDataTyp := CubeExecRes.DataTypes;
Iter := Matr.CreateIterator;
Iter.Move(IteratorDirection.First);
Debug.WriteLine(Title);
Coord := Matr.CreateCoord;
While Iter.Valid Do
S := (Iter.Value As String) + " (" + Iter.CoordsAsString + ")";
Iter.PutCurrentPos(Coord);
If CubeDataTyp.DataType(Coord) <> CubeDataType.Default_ Then
S := S + "*";
End If;
Debug.WriteLine(s);
Iter.Move(IteratorDirection.Next);
End While;
End Sub ShowMatrix;
On executing the example the cube output matrix is calculated. The development environment console displays information about matrix: values in cells and cells coordinates. The cells containing calculated data will be also marked by the * character.
See also: