IPrxTableSources.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index - index of a relational data source.

Description

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.

Example

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:

IPrxTableSources