IEaxDataArea.InitMetabase

Fore Syntax

InitMetabase(pMetabaseObj: IMetabaseObject;

pMetabaseObjectDescriptor: IMetabaseObjectDescriptor;

pMetabase: IMetabase);

Fore.NET Syntax

InitMetabase(pMetabaseObj: Prognoz.Platform.Interop.Metabase.IMetabaseObject;

pMetabaseObjectDescriptor: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;

pMetabase: Prognoz.Platform.Interop.Metabase.IMetabase);

Parameters

pMetabaseObj. Repository object.

pMetabaseObjectDescriptor. Repository object description.

pMetabase. Collection of repository objects.

Description

The InitMetabase initializes work with repository objects.

Comments

To get parameters of analytical data area, use the IEaxDataArea.Params property.

Fore Example

Executing the example requires an express report with the EAX_DATAAREA identifier.

Add links to the Metabase and Express system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    mbObj: IMetabaseObject;
    mbObjDesc: IMetabaseObjectDescriptor;
    Expr: IEaxAnalyzer;
    DArea: IEaxDataArea;
Begin
    mb := MetabaseClass.Active;
    mbObjDesc := mb.ItemById("EAX_DATAAREA");
    mbObj := mbObjDesc.Bind;
    Expr := mbObj As IEaxAnalyzer;
    DArea := Expr.DataArea;
    DArea.InitMetabase(mbObj, mbObjDesc, mb);
    Debug.WriteLine("Number of slices: " + DArea.Slices.Count.ToString);
    DArea.Execute;
End Sub UserProc;

After executing the example the specified repository object (express report) is initialized, the console window shows the number of slices, which was used as data sources for express report.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    mbObj: IMetabaseObject;
    mbObjDesc: IMetabaseObjectDescriptor;
    Expr: IEaxAnalyzer;
    DArea: IEaxDataArea;
Begin
    mb := Params.Metabase;
    mbObjDesc := mb.ItemById["EAX_DATAAREA"];
    mbObj := mbObjDesc.Bind();
    Expr := mbObj As IEaxAnalyzer;
    DArea := Expr.DataArea;
    DArea.InitMetabase(mbObj, mbObjDesc, mb);
    System.Diagnostics.Debug.WriteLine("Number of slices: " + DArea.Slices.Count.ToString());
    DArea.Execute();
End Sub;

See also:

IEaxDataArea