IDimSelection.ApplySelectionSchemaOnRebuild

Fore Syntax

ApplySelectionSchemaOnRebuild: Boolean;

Fore.NET Syntax

ApplySelectionSchemaOnRebuild: boolean;

Description

The ApplySelectionSchemaOnRebuild property determines whether selection schema must be applied on dimension rebuild.

Comments

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:

Fore Example

Executing the example requires that the repository contains an express report with the EXP_REP_ASSOR identifier, which data source is a cube with the DIC_RF table MDM dictionary located in the MDM repository with the SCHEMA_OTM selection schema.

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.ItemByIdNamespace("DIC_RF", MB.ItemById("RDS").Key) As IMetabaseObjectDescriptor;
    // 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;

After executing the example the selection schema will be applied on each dimension rebuild.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
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.ItemByIdNamespace["DIC_RF", MB.ItemById["RDS"].Key] As IMetabaseObjectDescriptor;
    // 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;

See also:

IDimSelection

Related work items

Requirement 1447440