IPrxTableSources.Clear

Syntax

Clear;

Description

The Clear method clears the collection of relational data sources.

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 the regular report will contain a single relational data source. Report - identifier of a regular report, Table - table identifier.

See also:

IPrxTableSources