使用OLAP多维数据集维度在运行时创建dev Pivot网格 [英] creating dev Pivot grid at runtime using OLAP cube dimensions

查看:117
本文介绍了使用OLAP多维数据集维度在运行时创建dev Pivot网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我在我的项目中使用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

推荐答案

我在数据表中存储了来自db的维度层次结构。

然后我使用for循环读取完整的层次结构并手动分配字段名
I stored the dimension hierarchy coming from db in datatable.
Then I read the complete hierarchy using for loop and manually assigned the fieldnames


这篇关于使用OLAP多维数据集维度在运行时创建dev Pivot网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆