Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
How Can I reach XmlaDataSource Cubes List?
posted

Hi;

I use an XamPivotGrid and send its Query from another page. When I try to XML Query to Deserialize and fetch data to pivot grid, I could use the following code.

 pivotGrid.DataSource.Cube = pivotGrid.DataSource.Cubes[this.SelectedCubeIndex]

But pivotGrid.DataSource  does not have  any Cubes. I could not load any Cubes to dataSource.

Here is connection codes are like : 

XmlaConnectionSettings Settings = new XmlaConnectionSettings();
Settings.ServerUri = new Uri("http://server/OLAP/msmdpump.dll");
XmlaConnection Connection = new XmlaConnection(Settings);
XmlaDataProvider DataProvider = new XmlaDataProvider(Connection);
XmlaDataSource DataSource = new XmlaDataSource(DataProvider);
DataSource.Database = XmlaDataSource.GenerateInitialDatabase("DataBaseName");
DataSource.LoadSchemaAsync();