Remove(Index: Integer): Boolean;
Index. Data source index.
The Remove method removes data source by its index.
The method returns True in case of successful removal.
Executing the example requires a regular report with the REGULAR_REPORT identifier.
Add links to the Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DtSources: IPrxDataSources;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REGULAR_REPORT").Edit;
Report := MObj As IPrxReport;
DtSources := Report.DataSources;
If DtSources.Remove(0) Then
Debug.WriteLine("Remove");
Else Debug.WriteLine("Don't remove");
End If;
MObj.Save;
End Sub UserProc;
After executing the example the console window displays the message whether the selected data source is removed.
See also: