IPrxTableSources.Add

Syntax

Add([Value: IDatasetModel = Null]): IPrxTableSource;

Parameters

Value - data source to be added.

Description

The Add method adds a relational data source.

Example

Sub Main;

Var

MB: IMetabase;

MObj : IMetabaseObject;

Report : IPrxReport;

TSources : IPrxTableSources;

TSource : IPrxTableSource;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Report").Edit;

Report := MObj As IPrxReport;

TSources := Report.TableSources;

TSources.Clear;

TSource := TSources.Add;

TSource.Dataset := MetabaseClass.Active.ItemById("Table").Bind As IDatasetModel;

MObj.Save;

End Sub Main;

After executing the example a relational data source is added. Report - identifier of a regular report, Table - table identifier.

See also:

IPrxTableSources