ICompoundSelection.IsDisplayCompound

Fore Syntax

IsDisplayCompound: Boolean;

Fore.NET Syntax

IsDisplayCompound: boolean;

Description

The IsDisplayCompound property determines whether private dimensions are displayed as a composite dictionary.

Comments

Available values:

Fore Example

Executing the example requires a form containing the CheckBox component named CheckBox1, the ErAnalyzerDimPanel component named ErAnalyzerDimPanel1 and the UiErAnalyzer component named UiErAnalyzer1 which is a data source for the ErAnalyzerDimPanel1 component. Specify the express report created by several sources as a data source for the UiErAnalyzer1 component.

The CheckBox1 component is identical to the As a Composite Dimension checkbox displayed on the Private Dimensions tab of the Selection panel of express report.

The example is a handler of the OnCreate event for the form and the OnChange event for the CheckBox1 component.

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

    analyzer: IEaxAnalyzer;
    CompoundSel: ICompoundSelection;


Sub
 TESTFormOnCreate(Sender: Object; Args: IEventArgs);
Var
    pivot: IPivot;
    VirtualCube: IVirtualCube;
    CompoundDimKey: Integer;
Begin
    analyzer := UiErAnalyzer1.ErAnalyzer;
    pivot := analyzer.Pivot;
    VirtualCube := (pivot.DataSource As ICubeInstanceDestination).Cube.Cube As IVirtualCube;
    CompoundDimKey := (VirtualCube.FactDimension As IMetabaseObjectDescriptor).Key;
    CompoundSel := pivot.Selection.FindByKey(CompoundDimKey) As ICompoundSelection;
    CheckBox1.Checked := CompoundSel.IsDisplayCompound;
End Sub TESTFormOnCreate;

Sub CheckBox1OnChange(Sender: Object; Args: IEventArgs);
Var
    pivot: IPivot;
    VirtualCube: IVirtualCube;
    CompoundDimKey: Integer;

Begin
    CompoundSel.IsDisplayCompound := CheckBox1.Checked;
    text := CompoundSel.IsDisplayCompound.ToString;
    analyzer.DataSources.Refresh(False);
    pivot := analyzer.Pivot;        
    VirtualCube := (pivot.DataSource As ICubeInstanceDestination).Cube.Cube As IVirtualCube;
    CompoundDimKey := (VirtualCube.FactDimension As IMetabaseObjectDescriptor).Key;
    CompoundSel := pivot.Selection.FindByKey(CompoundDimKey) As ICompoundSelection;
End Sub CheckBox1OnChange;

After executing the example on selecting checkbox private dimensions will be displayed as composite dictionary consisting of elements of data sources private dimensions. In this case, the form title will display the True value.

Fore.NET Example

Requirements and result of executing Fore.NET Example match with that of Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Metabase;

    analyzer: IEaxAnalyzer;
    CompoundSel: ICompoundSelection;

Private Sub TESTForm_Load(sender: System.Object; e: System.EventArgs);
Var
    pivot: IPivot;
    VirtualCube: IVirtualCube;
    CompoundDimKey: uinteger;
Begin
    analyzer := uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
    pivot := analyzer.Pivot;
    VirtualCube := (pivot.DataSource As ICubeInstanceDestination).Cube.Cube As IVirtualCube;
    CompoundDimKey := (VirtualCube.FactDimension As IMetabaseObjectDescriptor).Key;
    CompoundSel := pivot.Selection.FindByKey(CompoundDimKey) As ICompoundSelection;
    CheckBox1.Checked := CompoundSel.IsDisplayCompound;
End Sub;

Private Sub checkBox1_CheckedChanged(sender: System.Object; e: System.EventArgs);
Var
    pivot: IPivot;
    VirtualCube: IVirtualCube;
    CompoundDimKey: uinteger;
Begin
    CompoundSel.IsDisplayCompound := CheckBox1.Checked;
    text := CompoundSel.IsDisplayCompound.ToString();
    analyzer.DataSources.Refresh(False);
    pivot := analyzer.Pivot;        
    VirtualCube := (pivot.DataSource As ICubeInstanceDestination).Cube.Cube As IVirtualCube;
    CompoundDimKey := (VirtualCube.FactDimension As IMetabaseObjectDescriptor).Key;
    CompoundSel := pivot.Selection.FindByKey(CompoundDimKey) As ICompoundSelection;
End Sub;

See also:

ICompoundSelection | Working with Private Dimensions