CubeInstance: ICubeInstance;
The CubeInstance property returns a cube instance described by the ICubeInstance interface.
Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier. The catalog contains the ADOMD cube with the Cube_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
Cube: IAdoMdCubeInstance;
CrInfo: IMetabaseObjectCreateInfo;
Expr: IEaxAnalyzer;
Begin
MB := MetabaseClass.Active;
//Open cube
Cube := MB.ItemByIdNamespace("Cube_1", MB.GetObjectKeyById("ADOMDTest")).Open(Null) As IAdoMdCubeInstance;
//Information for creation of an express report
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
CrInfo.Id := MB.GenerateId("ADOMDReport");
CrInfo.Parent := MB.Root;
//Create express report based on the ADOMD cube
Expr := MB.CreateObject(CrInfo).Edit As IEaxAnalyzer;
Expr.OpenCube(Cube.CubeInstance);
(Expr As IMetabaseObject).Save;
End Sub UserProc;
On executing this example an express report is created using an instance of the ADOMD cube.
See also: