IEaxDataSources.AddDescriptor

Syntax

AddDescriptor(Desc: IMetabaseObjectDescriptor): IEaxDataSource;

Parameters

Desc. Description of the repository object that will be used as an express report data source.

Description

The AddDescriptor method adds a data source to express report by object description in the repository.

Comments

Unlike the IEaxDataSources.Add method, the AddDescriptor method adds a data source without its prior opening.

Example

Executing the example requires an express report with the EXPRESS_REPORT identifier and a cube with the CUBE identifier.

Add links to the Express, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Expr: IEaxAnalyzer;
    ExprDS: IEaxDataSources;
    Cube: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    Expr := MB.ItemById(
"EXPRESS_REPORT").Edit As IEaxAnalyzer;
    ExprDS := Expr.DataSources;
    Cube := MB.ItemById(
"CUBE");
    ExprDs.AddDescriptor(Cube);
    (Expr 
As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the specified cube will be added as a data source for the express report.

See also:

IEaxDataSources