PopupSortAttribute(Attr: IDimAttribute);
PopupSortAttribute(Attr: Prognoz.Platform.Interop.Dimensions.IDimAttribute);
Attr. Dictionary attribute.
The PopupSortAttribute method sorts hierarchy elements by specified attribute.
To sort hierarchy elements, use the IEaxSelectionPadContext.PopupSort method.
Executing the example requires a form with the button named Button1 on it, the EaxConfigurationPanel component named EaxConfigurationPanel1 and the UiErAnalyzer component which is installed as data source for EaxConfigurationPanel1. UiErAnalyzer1 is connected to the express-report which contains a dimension with the D_TO identifier which the MDM dictionary located in the MDM repository with the RDS identifier. This dictionary contains attribute with the TERRID identifier.
This example is a handler of the OnClick event for the Button1 component.
Add link to the Metabase, Dimensions system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
mb: IMetabase;
Dim: IDimensionModel;
Attr: IDimAttribute;
Attrs: IDimAttributes;
sps: ISystemPadContext;
PadContext: IEaxSelectionPadContext;
Begin
mb := MetabaseClass.Active;
Dim := mb.ItemByIdNamespace("D_TO", MB.ItemById("RDS").Key).Bind As IDimensionModel;
Attrs := Dim.Attributes;
Attr := Attrs.FindById("TERRID");
sps := EaxConfigurationPanel1.GetActiveContext;
PadContext := sps As IEaxSelectionPadContext;
PadContext.PopupSortAttribute(Attr);
Debug.WriteLine("Sorting by the TERRID attribute is made in dimension "
+ PadContext.DimSelection.Dimension.Name);
End Sub Button1OnClick;
On the side panel pass to the Selection tab group and selection dimension. On clicking the button sorting of dimension elements is made by the TERRID attribute.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Dimensions;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
mb: IMetabase;
Dim: IDimensionModel;
Attr: IDimAttribute;
Attrs: IDimAttributes;
sps: ISystemPadContext;
PadContext: IEaxSelectionPadContext;
Begin
mb := Self.Metabase;
Dim := mb.ItemByIdNamespace["D_TO", MB.ItemById["RDS"].Key].Bind() As IDimensionModel;
Attrs := Dim.Attributes;
Attr := Attrs.FindById("TERRID");
sps := eaxConfigurationPanelNet1.CtrlBox.GetActiveContext();
PadContext := sps As IEaxSelectionPadContext;
PadContext.PopupSortAttribute(Attr);
System.Diagnostics.Debug.WriteLine("Sorting by the TERRID attribute is made in dimension "
+ PadContext.DimSelection.Dimension.Name);
End Sub;
See also: