Move(IndexFrom: Integer; IndexTo: Integer);
IndexFrom: Index of position of the moved data source
IndexTo: Index of the position to which the data source is to be moved.
The Move method moves a data source in the collection form the position that has the IndexFrom index to the position with the IndexTo index.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. This express report should contain two or more data sources.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Expr: IEaxAnalyzer;
ExpDs: IEaxDataSources;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("EXPRESS_REPORT").Edit;
Expr := MObj As IEaxAnalyzer;
ExpDs := Expr.DataSources;
ExpDs.Move(0, 1);
MObj.Save;
End Sub Main;
After executing the example, the first data source is moved to the second position in the collection of express report data sources.
See also: