Move(OldIndex: Integer; NewIndex: Integer);
OldIndex - index of the group to be moved.
NewIndex - new index of the group.
The Move method moves a group to the specified position.
Sub Main;
Var
MB: IMetabase;
MObj : IMetabaseObject;
Report : IPrxReport;
TabIs : IPrxTableIslands;
TI : IPrxTableIsland;
Grs : IPrxTableIslandGroupings;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
TabIs := Report.TableIslands;
TI := TabIs.Item(0);
TI := Ti.Edit;
Grs := TI.Groupings;
Grs.Move(0,1);
TI.Save;
MObj.Save;
End Sub Main;
After executing the example the specified group is moved. Report - identifier of the regular report, which sheet contains a relational data area, for which two groups have been created.
See also: