IEaxAnalyzer.OpenCubeEx

Fore Syntax

OpenCubeEx(CubeInstance: ICubeInstance; Options: EaxOpenCubeOptions);

Fore.NET Syntax

OpenCubeEx(CubeInstance: Prognoz.Platform.Interop.Cubes.ICubeInstance; Options: Prognoz.Platform.Interop.Express.EaxOpenCubeOptions);

Parameters

CubeInstance. Cube used as a data source.

Options. Cube opening mode.

Description

The OpenCubeEx method opens a cube (with advanced parameters) used to create the express report.

Comments

Available modes:

 Fore Example

Executing the example requires that the repository contains a cube with the identifier CUBE_SEP.

Add the links to the Metabase, Cubes, and Express system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    CreateInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    Cube: ICubeInstance;
Begin
    MB := MetabaseClass.Active;
    CreateInfo := MB.CreateCreateInfo;
    CreateInfo.Id := MB.GenerateId("EXPR_REP");
    CreateInfo.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
    MObj := MB.CreateObject(CreateInfo).Edit;
    Expr := MObj As IEaxAnalyzer;
    Cube := MB.ItemById("CUBE_SEP").Open(NullAs ICubeInstance;
    Expr.OpenCubeEx(Cube, EaxOpenCubeOptions.DefaultView);
    MObj.Save;
End Sub UserProc;

After executing this example an express report is created based on the saved view for the CUBE_SEP cube. Identifier of the created report is displayed to the console window.

 Fore.NET Example

Executing the example requires that the repository contains a cube with the identifier CUBE_SEP.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    CreateInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    Cube: ICubeInstance;
Begin
    MB := Params.Metabase;
    CreateInfo := MB.CreateCreateInfo();
    CreateInfo.Id := MB.GenerateId("OBJ_EXPR_REP"0);
    CreateInfo.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT As integer;
    CreateInfo.Parent := MB.ItemById["OBJ23722"];
    MObj := MB.CreateObject(CreateInfo).Edit();
    Expr := MObj As IEaxAnalyzer;
    Cube := MB.ItemById["CUBE_SEP_COPY7"].Open(NullAs ICubeInstance;
    Expr.OpenCubeEx(Cube, EaxOpenCubeOptions.eocoDefaultView);
    MObj.Save();
    System.Diagnostics.Debug.WriteLine(CreateInfo.Id);
End Sub;

After executing this example an express report is created based on the saved view for the CUBE_SEP cube. Identifier of the created report is displayed to the console window.

See also:

IEaxAnalyzer