Dimension(Dimension: IDimensionModel): IPrxDataIslandDimension;
Dimension. Dimension, on which data area is built.
The Dimension property returns an object containing parameters of the dimension of the data slice based on which the data area is built.
Executing the example requires a regular report with the REPORT identifier, which contains data area. Add links to the Metabase, Report and Dimensions system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Prop: IPrxDataIslandProperties;
Sort: IPrxDataIslandDimensionSort;
DimModel: IDimensionModel;
DI: IPrxDataIsland;
Slice: IPrxSlice;
Head: IPrxSliceHeader;
SliceDim: IPrxSliceDimension;
Dim: IDimInstance;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REPORT").Edit;
DI := (MObj As IPrxReport).DataIslands.Item(0).Edit;
Prop := DI.Properties;
Slice := DI.Slice;
Head := Slice.TopHeader;
SliceDim := Head.Item(0);
Dim := SliceDim.Dimension;
DimModel := Dim.Dimension;
// Set dimension sorting by element name.
Sort := Prop.Dimension(DimModel).Sort;
Sort.Kind := PrxDimensionSortKind.ByName;
Sort.Enabled := True;
DI.Save;
// Save report.
MObj.Save;
End Sub UserProc;
After executing the example sorting by the first dimension located in columns is enabled. Sorting type - by element name.
See also: