IPrxDataSources.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index. Data source index.

Description

The Remove method removes data source by its index.

Comments

The method returns True in case of successful removal.

Example

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(0Then
        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:

IPrxDataSources