ApplySelectionSchemaOnRebuild: Boolean;
ApplySelectionSchemaOnRebuild: Boolean;
The ApplySelectionSchemaOnRebuild property determines whether selection schema must be applied on dimension rebuild.
If both properties ApplySelectionSchemaOnRebuild and IDimSelection.ApplySelectionSchemaOnlyOnce are set, when the dimension is built for the first time, only IDimSelection.ApplySelectionSchemaOnlyOnce is handled, when the dimension is rebuilt, ApplySelectionSchemaOnRebuild is handled.
Available values:
True. The selected selection schema will be applied on each dimension rebuild.
False. Default value. Element selection schema will be always applied.
Executing the example requires that repository contains an express report with the EXP_REP_ASSOR identifier, which data source is a standard cube including the DIC_RF table MDM dictionary. The SCHEMA_OTM selection schema is created for dictionary.
Add links to the Dimensions, Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Eax: IEaxAnalyzer;
DimSelection: IDimSelection;
Dict: IMetabaseObjectDescriptor;
Schema: IDimSelectionSchema;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
MObj := MB.ItemById("EXP_REP_ASSOR").Edit;
// Get table MDM dictionary
Dict := MB.ItemById("DIC_RF");
// Get selection schema
Schema := MB.ItemByIdNamespace("SCHEMA_OTM", Dict.Key).Edit As IDimSelectionSchema;
Eax := MObj As IEaxAnalyzer;
DimSelection := Eax.Pivot.Selection.FindById("DIC_RF");
// Set applying of selection schema on dimension rebuild
DimSelection.ApplySelectionSchemaOnRebuild := True;
DimSelection.SelectionSchema := Schema;
// Save express report
Mobj.Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Pivot;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Eax: IEaxAnalyzer;
DimSelection: IDimSelection;
Dict: IMetabaseObjectDescriptor;
Schema: IDimSelectionSchema;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
MObj := MB.ItemById["EXP_REP_ASSOR"].Edit();
// Get table MDM dictionary
Dict := MB.ItemById["DIC_RF"];
// Get selection schema
schema := MB.ItemByIdNamespace["SCHEMA_OTM", Dict.Key].Edit() As IDimSelectionSchema;
Eax := MObj As IEaxAnalyzer;
DimSelection := Eax.Pivot.Selection.FindById("DIC_RF");
// Set applying of selection schema on dimension rebuild
DimSelection.ApplySelectionSchemaOnRebuild := True;
DimSelection.SelectionSchema := schema;
// Save express report
Mobj.Save();
End Sub;
After executing the example the selection schema will be applied on each dimension rebuild.
See also:
Related work items
Requirement 1447440