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 that the repository contains the Repository Connection object with the Link_Test identifier. The repository, with which the connection is established, contains a regular report with the Report_1 identifier.

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 a shortcut to the Report_1 regular report is created in the repository root.

See also:

IMetabaseLinkInstance