IsCompound: Boolean;
The IsCompound property determines whether elements of composite dictionary or elements of composite dictionary sources are selected.
Available values:
True. Selection is set under elements of composite dictionary.
False. Selection is set under elements of composite dictionary sources.
If the property is set to True, it is necessary to cast the ICompoundSelection interface to IDimSelection and set selection using its properties and methods. If the property is set to False, it is necessary to set selection according to cube dimensions in the Selection property.
Executing the example requires a form with the following components: Button, UiErAnalyzer, ErAnalyzerDimPanel, and TabSheetBox with the identifiers Button1, UiErAnalyzer1, ErAnalyzerDimPanel1 and TabSheetBox1 respectively. The ErAnalyzerDimPanel1 and TabSheetBox1 components have the UiErAnalyzer1 component as a source, which is connected to the express report based on several data sources.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
curolap: IEaxAnalyzer;
Pivot: IPivot;
Selection: IDimSelectionSet;
CompoundSel, CompoundSel1: ICompoundSelection;
dimSel: IDimSelection;
Begin
curolap := UiErAnalyzer1.Instance As IEaxAnalyzer;
Pivot := curolap.Pivot;
Pivot.BeginSelectionUpdate;
Selection := Pivot.Selection;
CompoundSel := Selection.FindById("FACTS_COMPOUND") As ICompoundSelection;
If CompoundSel.IsCompound Then
dimSel := CompoundSel As IDimSelection;
dimSel.SelectAll;
Else
For Each CompoundSel1 In CompoundSel.Selection Do
For Each dimSel In CompoundSel1.Selection Do
dimSel.SelectElement(0, False);
dimSel.SelectAll;
End For;
End For;
End If;
Pivot.EndSelectionUpdate;
End Sub Button1OnClick;
After executing the example clicking the Button1 component creates a composite dictionary from the private dimensions selected in the ErAnalyzerDimPanel1 component.
See also: