MoveToPosition(Disposition: PrxHeaderDisposition; Position: Integer);
Disposition - slice header.
Position - position of the dimension in the slice header.
The MoveToPosition method moves the dimension to the selected position of the specified slice header. The header and the position are specified using the parameters Disposition and Position respectively.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DtSources: IPrxDataSources;
Slices: IPrxSlices;
SliceDims: IPrxSliceDimensions;
SliceDim: IPrxSliceDimension;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REPORT").Edit;
Report := MObj As IPrxReport;
DtSources := Report.DataSources;
Slices := DtSources.Item(0).Slices;
SliceDims := Slices.Item(0).Dimensions;
SliceDim := SliceDims.Item(SliceDims.Count - 1);
SliceDim.MoveToPosition(PrxHeaderDisposition.Fixed, 2);
MObj.Save;
End Sub UserProc;
After executing the example the last dimension of the first slice of the data source is placed to the third position in the Fixed group. The identifier of the regular report - Report.
See also: