IMetabaseLinkInstance.Metabase

Syntax

Metabase: IMetabase;

Description

The Metabase property returns data of the repository with which the connection was established.

Example

Executing the example requires the Connection with Repository object with the Link_Test identifier. The repository contains a regular report with the Report_1 identifier, with which the connection was established.

Sub Main;

Var

MB: IMetabase;

CrInfo: IMetabaseObjectCreateInfo;

Link: IMetabaseObject;

LinkInst: IMetabaseLinkInstance;

Begin

MB := MetabaseClass.Active;

CrInfo := MB.CreateCreateInfo;

CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_PROCEDURALREPORT;

CrInfo.Id := "Shortcut_Report_1";

CrInfo.Name := "Shortcut for Report_1";

CrInfo.Parent := MB.Root;

Link := MB.ItemById("Link_Test").Bind;

LinkInst := Link.Open(Null) As IMetabaseLinkInstance;

CrInfo.Link := Link As IMetabaseLink;

CrInfo.Shortcut := LinkInst.Metabase.ItemById("Report_1");

MB.CreateObject(CrInfo);

End Sub Main;

After executing this example the shortcut for the Report_1 regular report is created in the repository root.

See also:

IMetabaseLinkInstance