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();

Parents
  • 8831
    Verified Answer
    posted

    Hello,

    Once you call LoadSchemaAsync() for your target data source (the one you want to pick up a cube for) you can listen for LoadCubesCompleted event and check event args for the result or for the error. If the cubes are loaded successfuly at this point you also can check the Cubes collection which should contain your cubes.

    Regards.
    Plamen.

Reply Children