DimensionsIntegrityCheck: Boolean;
DimensionsIntegrityCheck: Boolean;
The DimensionsIntegrityCheck property determines whether it is checked if dictionaries included into selection are built.
If the property is set to True, during preparation for calculation of output matrix creation of all dictionaries, which are parts of selection, is checked beforehand. If on building any dictionary an error occurs, it is forwarded to the platform level.
The property is set to False by default, dictionaries are not checked. If during creation errors occur, dictionaries are not created. Selection by such dictionaries is not available.
Executing the example requires that the repository contains a cube with the Cube_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
Cub: ICubeInstance;
Dest: ICubeInstanceDestination;
Exec: ICubeInstanceDestinationExecutor;
Mat: IMatrix;
Iter: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
Cub := MB.ItemById("Cube_1").Open(Null) As ICubeInstance;
Dest := Cub.Destinations.DefaultDestination;
Exec := Dest.CreateExecutor;
Exec.DimensionsIntegrityCheck := True;
Try
Exec.PrepareExecute(Null);
Exec.PerformExecute;
Except On e: Exception Do
Debug.WriteLine(e.Message);
Finally
End Try;
Mat := Exec.Matrix;
If Not IsNull(Mat) Then
Iter := Mat.CreateIterator;
Iter.Move(IteratorDirection.First);
While Iter.Valid Do
Debug.WriteLine(Iter.Value);
Iter.Move(IteratorDirection.Next);
End While;
End If;
End Sub UserProc;
On executing the example the cube output matrix is prepared and calculated. Before calculation it is checked if all dictionaries, based on which the cube is created, are built. If during creation of dictionaries an error occurs, the text of this error is displayed in the development environment console. If there is no error and the matrix is calculated correctly, data of the matrix is also displayed in the development environment console.
Executing the example requires that the repository contains a cube with the Cube_1 identifier. The specified procedure is an entry point of the .NET assembly.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Cub: ICubeInstance;
Dest: ICubeInstanceDestination;
Exec: ICubeInstanceDestinationExecutor;
Matr: IMatrix;
Ite: IMatrixIterator;
Begin
MB := Params.Metabase;
Cub := MB.ItemById["Cube_1"].Open(Null) As ICubeInstance;
Dest := Cub.Destinations.DefaultDestination;
Exec := Dest.CreateExecutor();
Exec.DimensionsIntegrityCheck := True;
Try
Exec.PrepareExecute(Null);
Exec.PerformExecute(False);
Except On Ex: System.Exception Do
Begin
System.Diagnostics.Debug.WriteLine(Ex.message);
End;
Finally
End Try;
Matr := Exec.Matrix;
If Matr <> Null Then
Ite := Matr.CreateIterator();
Ite.Move(IteratorDirection.itdFirst);
While Ite.Valid Do
System.Diagnostics.Debug.WriteLine(Ite.Value);
Ite.Move(IteratorDirection.itdNext);
End While;
End If;
End Sub;
On executing the example the cube output matrix is prepared and calculated. Before calculation it is checked if all dictionaries, based on which the cube is created, are built. If during creation of dictionaries an error occurs, the text of this error is displayed in the development environment console. If there is no error and the matrix is calculated correctly, data of the matrix is also displayed in the development environment console.
See also: