IncludeNulls: Boolean;
IncludeNulls: Boolean;
The IncludeNulls property determines whether empty values are included into output matrix.
The property is set to False by default, empty values are excluded from output matrix of cube. If the property is set to True, empty cells are included into output matrix.
NOTE. If the cube contains a number of dimensions, including empty values to output matrix may considerably increase the number of used computer resources (particularly the volume of used virtual memory).
Executing the example requires that the repository contains a calculated cube with the CALC_CUBE identifier.
Sub UserProc;
Var
MB: IMetabase;
Cube: ICalculatedCubeInstance;
Exe: ICalculatedCubeExecutor;
Matr: IMatrix;
Iter: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
Cube := Mb.ItemById("CALC_CUBE").Open(Null) As ICalculatedCubeInstance;
Exe := Cube.CreateExecutor(Null);
Exe.EvaluateOnly := EvaluateOnlyType.All;
Exe.IncludeNulls := True;
(Exe As ICubeInstanceDestinationExecutor).PrepareExecute(Null);
Exe.Execute;
Matr := Exe.Matrix;
Iter := Matr.CreateIterator;
Iter.Move(IteratorDirection.First);
While Iter.Valid Do
Debug.WriteLine("' " + Iter.Value + " '");
Iter.Move(IteratorDirection.Next);
End While;
End Sub UserProc;
After executing the example the output matrix of calculated cube is calculated. Calculation is executed by the full cube selection, empty values are included into the output matrix. The obtained values are displayed in the development environment console.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Matrix;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Cube: ICalculatedCubeInstance;
Exe: ICalculatedCubeExecutor;
Matr: IMatrix;
Iter: IMatrixIterator;
Begin
MB := Params.Metabase;
Cube := Mb.ItemById["CALC_CUBE"].Open(Null) As ICalculatedCubeInstance;
Exe := Cube.CreateExecutor(Null);
Exe.EvaluateOnly := EvaluateOnlyType.ceotAll;
Exe.IncludeNulls := True;
(Exe As ICubeInstanceDestinationExecutor).PrepareExecute(Null);
Exe.Execute();
Matr := Exe.Matrix();
Iter := Matr.CreateIterator();
Iter.Move(IteratorDirection.itdFirst);
While Iter.Valid Do
System.Diagnostics.Debug.WriteLine("' " + Iter.Value + " '");
Iter.Move(IteratorDirection.itdNext);
End While;
End Sub;
See also: