ReverseOrder: Boolean;
The ReverseOrder property determines sorting direction. If this property is set to False, sorting is ascending; otherwise fact dimension is sorted in descending order.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
DimModel: IDimensionModel;
DimAttrs: IDimAttributes;
DimOrd: IDimOrders;
Order: IDimOrder;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("D_TO").Edit;
DimModel := MObj As IDimensionModel;
DimAttrs := DimModel.Attributes;
DimOrd := DimAttrs.Orders;
Order := DimOrd.Item(0);
If Order.ReverseOrder Then
Order.ReverseOrder := False;
Else
Order.ReverseOrder := True;
End If;
MObj.Save;
End Sub Main;
After executing the example sorting direction is changed for the first attribute in dictionary sorting list.
See also: