ColumnRowIndex: Integer;
The ColumnRowIndex property determines the number of a row or a column when sorting by row or column.
When the regular report contains hidden or filtered rows or columns, they are numbered taking into account value of the UseActualColumnIndex property.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DIs: IPrxDataIslands;
DI: IPrxDataIsland;
DimModel: IDimensionModel;
Prop: IPrxDataIslandProperties;
PropDim: IPrxDataIslandDimension;
Sort: IPrxDataIslandDimensionSort;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
DIs := Report.DataIslands;
DI := DIs.Item(0).Edit;
DimModel := DI.Slice.TopHeader.Item(0).Dimension.Dimension;
Prop := DI.Properties;
PropDim := Prop.Dimension(DimModel);
Sort := PropDim.Sort;
Sort.Enabled := True;
Sort.Kind := PrxDimensionSortKind.ByColumnRow;
Sort.ColumnRowIndex := 2;
DI.Save;
MObj.Save;
End Sub Main;
After executing the example sorting by the first dimension located in columns is enabled. Sorting type - By the second column. The identifier of the regular report - Report.
See also: