Express > Express Assembly Interfaces > IEaxAnalyzeCore > IEaxAnalyzeCore.OpenCube
OpenCube(CubeInstance: ICubeInstance);
CubeInstance. Cube that is a data source for express report.
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 UserProc;
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 UserProc;
After executing the example a new express report with the New_Express identifier is created 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: