IPrxReportControls.PrxControlAssociatedSelectionGetter

Syntax

PrxControlAssociatedSelectionGetter: IPrxControlAssociatedSelectionGetter;

Description

The PrxControlAssociatedSelectionGetter property returns the object that is used to get associative dimension selections of controls from MOLAP server.

Comments

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

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. The report contains controls that are set up to work with data source dimensions.

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

Sub UserProc;
Var
    Mb: IMetabase;
    Report: IPrxReport;
    DataArea: IEaxDataArea;
    Controls: IPrxReportControls;
    Getter: IPrxControlAssociatedSelectionGetter;
    DimSel: IDimSelection;
    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 of controls
        Controls := Report.Controls;
        Getter := Controls.PrxControlAssociatedSelectionGetter;
        // Associative dimension selection from the first control
        DimSel := Getter.FindByKey(Controls.Item(0).Key);
        If Not IsNull(DimSel) Then
            SelStr := DimSel.ToString;
            Debug.WriteLine(SelStr);
        Else
            Debug.WriteLine("Associative selection of the dimension, to which the " + Controls.Item(0).Id + " control is set up, is absent");
        End If;
        // Associative dimension selection from the second control
        DimSel := Getter.FindByKey(Controls.Item(1).Key);
        If Not IsNull(DimSel) Then
            SelStr := DimSel.ToString;
            Debug.WriteLine(SelStr);
        Else
            Debug.WriteLine("Associative selection of the dimension, to which the " + Controls.Item(1).Id + " control is set up, is absent");
        End If;
    End If;
End Sub UserProc;

After executing the example the development environment console displays associative dimension selections, to which the first regular report controls are set up to work with.

See also:

IPrxReportControls