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
Connection to Tabular Instance

I'm trying to connect to a SSAS Tabular Server instance via code behind. The Statement GenerateInitialDatabase works fine and returns the database. However the GenerateInitialCube methods returns just null. The String for the cube name is correct(screenshot attached from connection to it via excel). Under what circumstances does this method returns null?

AdomdConnectionSettings connectionSettings = new AdomdConnectionSettings();
connectionSettings.ConnectionString = connectionString;
((AdomdDataSource)MyXamPivotGrid.DataSource).ConnectionSettings = connectionSettings;
((AdomdDataSource)MyXamPivotGrid.DataSource).Database = XmlaDataSource.GenerateInitialDatabase("TestDatabase");
MyXamPivotGrid.DataSource.Cube = XmlaDataSource.GenerateInitialCube("Model");

  • 6995
    Offline posted


    Thank you for the post. Looking at the code snippet you provided ,your cube Datasource is XmlaDataSource not AdomdDatasource is this intentional? You are mixing two kind of datasources , as i am not familiar with this scenario.

    In our Sample browser we do have sample binding the PivotGrid with AdomdDataSource and XmlaDataSource if you wants to have a look.

    SB-> XamPivotGrid-> Data-> DataSource and SB-> XamPivotGrid-> Data->XMLAdataSource.

    Please let me know if you have any question.


    Divya Jain