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!
The stack might be helpful:
at Infragistics.Olap.Xmla.XmlaConnection.GetXmlaSoapWebClient[T]() at Infragistics.Olap.Xmla.XmlaDataProvider.LoadMembersAsyncImpl(ICube cube, Object userState, IDictionary`2 restrictions) at Infragistics.Olap.Xmla.XmlaDataProvider.LoadMembersAsync(ICube cube, IHierarchy hierarchy) at Infragistics.Olap.Xmla.XmlaDataSource.UpdateHierarchiesCollection(AreaItemsCollection hierarchiesCollection) at Infragistics.Olap.DataSourceBase.LoadInitialAreaItems() at Infragistics.Olap.DataSourceBase.CreateMetadataTree() at Infragistics.Olap.DataSourceBase.DataProviderLoadMeasureGroupDimensionsCompleted(Object sender, AsyncCompletedEventArgs e) at Infragistics.Olap.DataProviderBase.OnLoadMeasureGroupDimensionsCompleted(AsyncCompletedEventArgs args) at NCM.BIVizControls.AdomdDataProvider._client_LoadMeasureGroupDimensionsCompleted(Object sender, LoadMeasureGroupDimensionsCompletedEventArgs e) at NCM.BIVizControls.OLAPService.OLAPServiceClient.OnLoadMeasureGroupDimensionsCompleted(Object state)
If I step back a bit and set the Rows property on the xamPivotGrid to:
Rows="[Product].[Sub Category Name]"
This shows up fine and I see measures along with the ability to filter by "Segment 1", "Segment 2", "Online", etc. These filter attributes are showing up in the built in filtering mechanism. When I select Segment 1 the control refreshes with only the Segment 1 values. This is GREAT!
But I'd like to filter this before the user sees this control so I thought I could apply the value in curly braces {see above} ^^^ and this would work. It looks like the control is attempting to do this, but the AdomdDataProvider (that is part of the Infragistics samples) is blowing up on a Null Reference and I've been trying to track that down. So the data source is trying to do something different. If I have the syntax for the filtering incorrect, the the data source just ignores the filtering and I get ALL the values instead of just getting Segment 1.
For example if you look at the Adventure Works sample database:
The unique name of France is [Sales Territory].[Sales Territory].[Country].&[France] but that name is valid for [Sales Territory].[Sales Territory] hierarchy only.
[Sales Territory].[Sales Territory Country] hierarchy has France member as well:
but it has a different name - [Sales Territory].[Sales Territory Country].&[France]. So if you haven't another tool where you can check the member unique name you can check what member name pattern is used in the hierarchy you're trying to load.
Are you sure the unique name of Segment 1 is: [Product].[Sub Category Name].&[Segment 1]
But there is no other hierarchy level between Sub Category Name and Segment 1. "Segment 1" is a unique value under the "Sub Category Name" level, as long with "Segment 2" and "Online".
Hi,Now I see that you might pass a wrong member unique name, because the filter part is using the member’s unique name.
Columns="[Sales Territory].[Sales Territory]{[Sales Territory].[Sales Territory].[Country].&[France]}"
That name depends on the pattern that member name follow.
Plamen.