IEaxDataArea.AssociatedSelSetEnabled

Syntax

AssociatedSelSetEnabled: Boolean;

Description

The AssociatedSelSetEnabled property determines whether associative analysis is used when working with data sources.

Comments

To use associative analysis, one should first install and set up InMemory MOLAP server.

Available values:

Example

Executing the example requires that the repository contains a regular report with the INMEM_REPORT identifier. The report contains a data source that should be cached and indexing information for analysis should be generated.

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

Sub UserProc;
Var
    Mb: IMetabase;
    Report: IPrxReport;
    DataArea: IEaxDataArea;
    Slice: IEaxDataAreaPivotSlice;
    Getter: IPivotSliceAssociatedSelectionGetter;
    DimSel: IDimSelection;
    DimKey: Integer;
    SelStr: String;
Begin
    Mb := MetabaseClass.Active;
    Report := Mb.ItemById("INMEM_REPORT").Bind As IPrxReport;
    Report.Recalc;
    DataArea := Report.DataArea;
    If DataArea.AssociatedSelSetEnabled Then
        // Get object to work with associative selections
        Slice := DataArea.Slices.Item(0As IEaxDataAreaPivotSlice;
        Getter := Slice.AssociatedSelectionGetter;
        // Associative selection of the dimension located in sidehead
        DimKey := Slice.Pivot.LeftHeader.Dim(0).Key;
        DimSel := Getter.FindByKey(DimKey);
        If Not IsNull(DimSel) Then
            SelStr := DimSel.ToString;
            Debug.WriteLine(SelStr);
        Else
            Debug.WriteLine("Associative selection for dimension with key " + DimKey.ToString + " is absent");
        End If;
        // Associative selection of the dimension located in heading
        DimKey := Slice.Pivot.TopHeader.Dim(0).Key;
        DimSel := Getter.FindByKey(DimKey);
        If Not IsNull(DimSel) Then
            SelStr := DimSel.ToString;
            Debug.WriteLine(SelStr);
        Else
            Debug.WriteLine("Associative selection for dimension with key " + DimKey.ToString + " is absent");
        End If;
    End If;
End Sub UserProc;

After executing the example the development environment console displays associative selections of the dimensions located in regular report data source heading and sidehead.

See also:

IEaxDataArea