FindByKey(Key: Integer): IEaxDataSource;
Key : Data source key.
The FindByKey method searches a source in the data source collection by source key and returns an object containing desired express report data source.
Executing this example requires that the repository contains an express report with the EXPRESS_REPORT identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Expr: IEaxAnalyzer;
ExpDs: IEaxDataSources;
Exp: IEaxDataSource;
Res: String;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("EXPRESS_REPORT").Edit;
Expr := MObj As IEaxAnalyzer;
ExpDs := Expr.DataSources;
Exp := ExpDs.FindByKey(3);
If Exp <> Null
Then Res := "Find";
Else Res := "Don't find";
End If;
MObj.Save;
End Sub Main;
After executing this example the variable Res contains Find, if the collection of express report data sources contains a source with the key 3.
See also: