问题描述
您好,
我在我的项目中使用Devexpress透视网格,它在运行时使用我在运行时提供的OLAPConnectionstring绑定数据。但是我无法在运行时使用[CubeName.Dimension.GetByName]的属性找到维度的完整名称。有人可以通过在运行时读取多维数据集中的值来帮助我找到DataArea,FilterArea,RowArea和ColumnArea上绑定的确切维度名称。下面是我用来查找尺寸值的代码片段,
Dim mCube As Microsoft.AnalysisServices.Cube
Dim mDim As Microsoft.AnalysisServices.CubeDimension = Nothing
Dim AMOServer As New Microsoft.AnalysisServices.Server
Dim AMODatabase As Microsoft.AnalysisServices.Database
Dim ObjXMlDOM作为新的XmlDocument
ObjXMlDOM.Load(Application.StartupPath&\ Settings.xml)AMOServer.Connect(ObjXMlDOM.DocumentElement(AnalysisServer)。Attributes(ServerName)。Value)
AMODatabase = AMOServer.Databases.GetByName(ObjXMlDOM.DocumentElement(AnalysisServer)。属性(数据库)。值)
mCube = AMODatabase.Cubes.GetByName(p_DashBoardNodeInfo .CubeName)
在mCube中它只返回单个名称值。相反它应该返回值[DimensionName]。[DimensionAttribute]。[Values]
类似适用于Measures。
谢谢和问候,
Sandesh
Hi there,
I am using Devexpress pivot grid in my project which binds the data at runtime using OLAPConnectionstring provided by me at runtime. But I cannot find the complete name of dimension at runtime using property of [CubeName.Dimension.GetByName]. Can somebody help me find out the exact dimension name for binding on DataArea, FilterArea, RowArea and ColumnArea by reading values from cube at runtime. Below is code snippet which I am using to find the values of dimensions,
Dim mCube As Microsoft.AnalysisServices.Cube
Dim mDim As Microsoft.AnalysisServices.CubeDimension = Nothing
Dim AMOServer As New Microsoft.AnalysisServices.Server
Dim AMODatabase As Microsoft.AnalysisServices.Database
Dim ObjXMlDOM As New XmlDocument
ObjXMlDOM.Load(Application.StartupPath & "\Settings.xml") AMOServer.Connect(ObjXMlDOM.DocumentElement("AnalysisServer").Attributes("ServerName").Value)
AMODatabase = AMOServer.Databases.GetByName(ObjXMlDOM.DocumentElement("AnalysisServer").Attributes("Database").Value)
mCube = AMODatabase.Cubes.GetByName(p_DashBoardNodeInfo.CubeName)
In mCube it is returning me only single name value. Instead it should return value as [DimensionName].[DimensionAttribute].[Values]
similar applies for Measures.
Thanks and Regards,
Sandesh
推荐答案
这篇关于使用OLAP多维数据集维度在运行时创建dev Pivot网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!