OpenCube(CubeInstance: ICubeInstance);
CubeInstance. The cube used as an express report data source.
The OpenCube method opens the cube, based on which the express report should be created.
Executing the example requires that the repository contains a cube with the CUBE_SEP identifier. The repository should also contain a folder with the EXPRESS_FOLDER identifier, 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") <> Null) Then
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(Null) As ICubeInstance;
Expr.OpenCube(Cube);
MObj.Save;
End Sub Main;
Executing the example creates a new express report with the New_Express identifier based on the cube with the Cube_sep identifier. If such a report already exists, it is removed. Selection in cube dimensions is set by default.
See also: