Execute([Options: Integer = 0]): IDalCursor;
Options - a reserved parameter. It is not used at the moment.
The Execute method enables the user to get data from a relational data source.
Sub Main;
Var
MB: IMetabase;
MObj : IMetabaseObject;
Report : IPrxReport;
TSources : IPrxTableSources;
TSource : IPrxTableSource;
DS : IDalCursor;
Name : String;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Report").Edit;
Report := MObj As IPrxReport;
TSources := Report.TableSources;
TSource := TSources.Item(0);
DS := TSource.Execute;
Name := DS.Fields.Item(0).Name;
Debug.WriteLine(Name);
MObj.Save;
End Sub Main;
After executing the example the console window displays the name of a field of the table that is used as a relational data source in the regular report. Report - identifier of a regular report.
See also: