Add([Value: IDatasetModel = Null]): IPrxTableSource;
Value - data source to be added.
The Add method adds a relational data source.
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: