IncludeInSelection: Boolean;
IncludeInSelection: boolean;
The IncludeInSelection property determines whether the calculated cube will be included in to selection on cube calculation.
By default the property is set to False, if calculated fact is not selected, its values will not be calculated on cube calculation.
If the property is set to True, on cube calculation the calculated fact will be always added in selection and value calculation will be performed for it.
Executing the example requires a standard cube with the STD_CUBE identifier, at least one calculated fact is created in cube.
Add links to the system assemblies:
Sub UserProc;
Var
MB: IMetabase;
Cube: ICubeModel;
CubeDest: IStandardCubeDestination;
CB: IStandardCubeCalculatedFactBinding;
Begin
//Open cube for edit
MB := MetabaseClass.Active;
Cube := MB.ItemById("STD_CUBE").Edit As ICubeModel;
CubeDest := Cube.Destinations.DefaultDestination As IStandardCubeDestination;
//Get calculated fact binding
CB := CubeDest.CalcBindings.Binding(1) As IStandardCubeCalculatedFactBinding;
//Select checkbox
CB.IncludeInSelection := True;
//Save
(Cube As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Cube: ICubeModel;
CubeDest: IStandardCubeDestination;
CB: IStandardCubeCalculatedFactBinding;
Begin
//Open cube for edit
MB := Params.Metabase;
Cube := MB.ItemById["STD_CUBE"].Edit() As ICubeModel;
CubeDest := Cube.Destinations.DefaultDestination As IStandardCubeDestination;
//Get calculated fact binding
CB := CubeDest.CalcBindings.Binding[1] As IStandardCubeCalculatedFactBinding;
//Select checkbox
CB.IncludeInSelection := True;
//Save
(Cube As IMetabaseObject).Save();
End Sub;
As a result of example execution, it will be specified for calculated fact that it is included into selection on cube calculation.
See also: