IDimSelection.PredefinedSchema

Syntax

PredefinedSchema: IPredefinedSelectionSchema;

Description

The PredefinedSchema property returns an object for working with predefined selection schema of dimension.

Comments

Pre-defined schema of selection is used to automatic adding of a new dimension element to selection after dimension reopening.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table.

Add links to the Dimensions, Express, Metabase, Pivot system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Selection: IDimSelection;
    PreSchema: IPredefinedSelectionSchema;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get dimension selection
    Selection := Express.Pivot.Selection.Item(3);
    // Get predefined schema of dimension selection
    PreSchema := Selection.PredefinedSchema;
    // Select all elements
    If (PreSchema <> NullThen
        If (PreSchema.Count = 0Then
            PreSchema.Add(SelectionPrimitiveType.All);
        End If;
        // Use predefined schema of dimension selection
        PreSchema.Active := True;
    End If;
    // Save report
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example in specified dimension on adding a new element, it will automatically added in selection after report reopening.

See also:

IDimSelection