Remove(Index: Integer): Boolean;
Index - index of a relational data source.
The Remove method removes a relational data source by the specified index. If the removal is successful, the method returns True, otherwise it returns False.
Sub Main;
Var
MB: IMetabase;
MObj : IMetabaseObject;
Report : IPrxReport;
TSources : IPrxTableSources;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
TSources := Report.TableSources;
If TSources.Remove(0) Then
Debug.WriteLine("Yes");
Else
Debug.WriteLine("No");
End If;
MObj.Save;
End Sub Main;
After executing the example the relational data source is removed and the console window displays an appropriate message. Report - identifier of a regular report.
See also: