IEaxAnalyzer.OpenCube

Syntax

OpenCube(CubeInstance: ICubeInstance);

Parameters

CubeInstance. Thecube used as the express report data source.

Description

The OpenCube method opens cube based on which the express report is created.

Example

Executing the example requires that a cube with the identifier CUBE_SEP is available in the repository. Also the repository should contain a folder with the identifier EXPRESS_FOLDER, to which the new express report will be saved.

Sub Main;
Var
    MB: IMetabase;
    CreateInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    Cube: ICubeInstance;
Begin
    MB := MetabaseClass.Active;
    If (MB.ItemById("New_Express") <> NullThen
        MB.DeleteObject(Mb.ItemById("New_Express").Key);
    End If;
    CreateInfo := MB.CreateCreateInfo;
    CreateInfo.Id := "New_Express";
    CreateInfo.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
    CreateInfo.Parent := MB.ItemById("EXPRESS_FOLDER");
    MObj := MB.CreateObject(CreateInfo).Edit;
    Expr := MObj As IEaxAnalyzer;
    Cube := MB.ItemById("CUBE_SEP").Open(NullAs ICubeInstance;
    Expr.OpenCube(Cube);
    MObj.Save;
End Sub Main;

Executing the example creates a new express report with the identifier New_Express based on the cube with the identifier Cube_sep. If such a report already exists, it is removed. Selection in cube dimensions is set by default.

See also:

IEaxAnalyzer