IEaxDataSources.RemoveByKey

Syntax

RemoveByKey(Key: Integer): Boolean;

Parameters

Key. Data source key.

Description

The RemoveByKey method removes a data source from the collection of express report sources by key.

Comments

Available values:

A data source key is sent using the Key parameter.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier.

Add links to the Express and Metabase system assemblies.

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    ExpDs: IEaxDataSources;
    Res: String;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("EXPRESS_REPORT").Edit;
    Expr := MObj As IEaxAnalyzer;
    ExpDs := Expr.DataSources;
    If ExpDs.RemoveByKey(3)
    Then Res :="Remove";
    Else Res :="Don't remove";
    End If;
    MObj.Save;
End Sub Main;

After executing the example the Res variable contains Remove if the express report data source with the 3 key has been successfully removed.

See also:

IEaxDataSources