OpenCube(CubeInstance: ICubeInstance);
CubeInstance. Thecube used as the express report data source.
The OpenCube method opens cube based on which the express report is created.
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") <> 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 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: