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
85
XmlaDataSource syntax in C#
posted

How is the syntax in C # for this code?

<olap:XmlaDataSource
      x:Key="DataSource"
      ServerUri="">sampledata.infragistics.com/.../msmdpump.dll"
      Database="Adventure Works DW Standard Edition"
      Cube="Adventure Works"
      Filters="[Sales Territory].[Sales Territory Country]{[Sales Territory].[Sales Territory Country].&amp;[United Kingdom]}"
      Columns="[Date].[Calendar]"
      Rows="[Geography].[City]"
      Measures="Reseller Sales Amount" />

Please Help me, thanks!

Parents
  • 7922
    Verified Answer
    posted

    Hi

    the code behind is like bellow:

     XmlaDataSource xmlaDataSource = new XmlaDataSource();

    xmlaDataSource.ServerUri = new Uri("http://sampledata.infragistics.com/olap/msmdpump.dll");

    xmlaDataSource.Database = XmlaDataSource.GenerateInitialDatabase("Adventure Works DW 2008");

    xmlaDataSource.Cube = DataSourceBase.GenerateInitialCube("Adventure Works");

    xmlaDataSource.Columns = DataSourceBase.GenerateInitialItems("[Date].[Calendar]");

    xmlaDataSource.Rows = DataSourceBase.GenerateInitialItems("[Geography].[City]");

    xmlaDataSource.Filters = DataSourceBase.GenerateInitialItems("[Sales Territory].[Sales Territory Country]{[Sales Territory].[Sales Territory Country].&amp;[United Kingdom]}");

    xmlaDataSource.Measures = DataSourceBase.GenerateInitialItems("Reseller Sales Amount");

     

    pivotGrid.DataSource = xmlaDataSource;

    Regards

    Todor

     

Reply Children