MergedNamingMode: PivotMergedNamingMode;
MergedNamingMode: Prognoz.Platform.Interop.Pivot.PivotMergedNamingMode;
The MergedNamingMode property determines a method for merging elements of different dimensions.
To display merging in an express report, select arrangement by all dimensions (go to the Designer ribbon tab, click the Arrangement button and select the All Dimensions checkbox).
Merging is executed for names of elements of the first dimension by rows or columns and the name of the dimension element specified in the IPivotDimensionSettingsEx.MergedElement property. The setup of the IPivotDimensionSettingsEx.MergedElement property can be determined by any dimension except for the first one located by rows or columns.
Executing the example requires a form with the Button1 button, the UiErAnalyzer component named UiErAnalyzer1 and any visualizer that displays express report data. The UiErAnalyzer1 component is connected to an express report, in which all dimensions are arranged in one column and one row. The express report sidehead contains at least two dimensions.
Add links to the Dimensions, Express, Pivot system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Eax: IEaxAnalyzer;
Pivot: IPivot;
Key: Integer;
DimSettings: IPivotDimensionSettingsEx;
Begin
Eax := UiErAnalyzer1.ErAnalyzer;
Pivot := Eax.Pivot;
// Merging method and separator that will be used in name
Pivot.MergedNamingMode := PivotMergedNamingMode.UpperElement Or PivotMergedNamingMode.LowerElement;
Pivot.MergedNamingSeparator := " | ";
// Key of the second dimension located in sidehead
Key := Pivot.LeftHeader.Dim(1).Key;
// Dimension settings
DimSettings := Pivot.Dimensions.FindByKey(Key).Settings;
DimSettings.MergedElement := 0;
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Eax: EaxAnalyzer;
Pivot: IPivot;
Key: UInteger;
DimSettings: IPivotDimensionSettingsEx;
Begin
Eax := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
Pivot := Eax.Pivot;
// Merging method and separator that will be used in name
Pivot.MergedNamingMode := PivotMergedNamingMode.pmnmUpperElement Or PivotMergedNamingMode.pmnmLowerElement;
Pivot.MergedNamingSeparator := " | ";
// Key of the second dimension located in sidehead
Key := Pivot.LeftHeader.Dim[1].Key;
// Dimension settings
DimSettings := Pivot.Dimensions.FindByKey(Key).Settings;
DimSettings.MergedElement := 0;
End Sub;
Clicking the button in the express report sidehead enables merging of upper level element names with the first element of the second dimension.
See also: