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].&[United Kingdom]}" Columns="[Date].[Calendar]" Rows="[Geography].[City]" Measures="Reseller Sales Amount" />
Please Help me, thanks!
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].&[United Kingdom]}");
xmlaDataSource.Measures = DataSourceBase.GenerateInitialItems("Reseller Sales Amount");
pivotGrid.DataSource = xmlaDataSource;
Regards
Todor
I'm specifically looking at Filters in this post. Is that the correct syntax? I'm using the following:
Filters
="[Product].[Sub Category Name]{[Product].[Sub Category Name].&[Segment 1]}"
I would expect the pivot data to be filtered by [Product].[Sub Category Name] whose value is "Segment 1". I get data back, but it's not filtered and the filter control on the xamPivotGrid is not changed either. And what if I also wanted "Segment 2". I don't see any examples as to the syntax on the XmlaDataSource reference page.
Thanks.