Click here to Skip to main content
15,891,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

I stored the dimension hierarchy coming from db in datatable.
Then I read the complete hierarchy using for loop and manually assigned the fieldnames
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900