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. There is a regular report with the Report_1 identifier in the repository with which the connection was established.

Add a link to the Metabase system assembly.

Sub UserProc;
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(NullAs IMetabaseLinkInstance;
    CrInfo.Link := Link As IMetabaseLink;
    CrInfo.Shortcut := LinkInst.Metabase.ItemById("Report_1");
    MB.CreateObject(CrInfo);
End Sub UserProc;

After executing the example in the root of the repository the shortcut for the Report_1 regular report will be created.

See also:

IMetabaseLinkInstance