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
75
Issue with multiple dimensions used as row header
posted

Hi all,
I’m new to the WinPivotGrid and MdxDataSelector and try to figure out what features the controls offer. For my investigation I use the AdventureWorks Data-Warehouse as a sample data source. In the first steps I was able to connect to the data source and bind it to the PivotGrid as well as to the DataSelector. As expected simple queries and breakdowns work. When I tried to build a more complex query an error occurs and shuts down the whole application.
Example:

var settings = new AdomdInitialSettings();
var sb = new StringBuilder();
sb.Append(@"data source=myDataSource;");
sb.Append("catalog=Adventure Works DW 2008R2;");
sb.Append("cube=Adventure Works;");  
settings.ConnectionString = sb.ToString();
var adomdDs = new AdomdDataSource(settings);
ultraPivotGrid1.DataSource = adomdDs;
mdxDataSelector1.DataSource = adomdDs;

As explained, with the code above connecting to the data source was no issue. Then I did the following using the MdxDataSelector:

1. Select Adventure Works cube
2. Add fact Sales Summary.Gross Profit as the measure
3. Add dimension Organisation.Organisations as column header
4. Add dimension Product.Product Categories as row header
5. Open row drilldown All Products->Accessories
6. Open column drilldown AdventureWorks Cycle->European Operations
7. Add dimension Geography.Country as additional row header
8. Try to open row drilldown All Geographies

Until step 7 everything works as expected. Step 8 causes the following error:

************** Ausnahmetext **************
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
   bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   bei Infragistics.Olap.Core.TableView.Initialize()
   bei Infragistics.Olap.Core.TableView.get_ColumnHeaders()
   bei Infragistics.Win.UltraWinPivotGrid.Data.OlapDataView.get_ColumnHeaderGrid()
   bei Infragistics.Win.UltraWinPivotGrid.Data.OlapDataView.get_ColumnTupleIndices()
   bei Infragistics.Win.UltraWinPivotGrid.Data.OlapDataView.SyncSortPositions(TableView tableView)
   bei Infragistics.Win.UltraWinPivotGrid.Data.OlapDataView.get_TableView()
   bei Infragistics.Win.UltraWinPivotGrid.UIElements.UltraPivotGridUIElement.PositionChildElements()
   bei Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   bei Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive)
   bei Infragistics.Win.UltraWinPivotGrid.UIElements.UltraPivotGridUIElement.Dirty(Boolean invalidate, Boolean update)
   bei Infragistics.Win.UltraWinPivotGrid.Internal.RowHeaderAreaSizeManager.DirtyIdealRowHeaderWidth(Nullable`1 columnIndex)
   bei Infragistics.Win.UltraWinPivotGrid.Internal.Metrics.Dirty()
   bei Infragistics.Win.UltraWinPivotGrid.AsyncController.ProcessDataSourceChanged_Async(DataSourceChangeType trigger, Result result)
   bei Infragistics.Win.UltraWinPivotGrid.UltraPivotGrid.OnDataSourceChanged(DataSourceChangeType trigger)
   bei Infragistics.Win.UltraWinPivotGrid.Data.OlapDataView.OnDataSourceChanged(Object sender, DataSourceChangedEventArgs e)
   bei Infragistics.Olap.DataSourceChangedHandler.Invoke(Object sender, DataSourceChangedEventArgs e)
   bei Infragistics.Olap.OlapDataSource.RaiseDataSourceChanged(DataSourceChangeType changeType)
   bei Infragistics.Olap.OlapDataSource.RaiseExpandAxisTupleMemberAsyncCompletedEvent(Object unused, ExpandAxisTupleMemberAsyncCompletedEventArgs e)

Doing the same in the Microsoft SQL Server Management Studio causes no problems.

What could be the reason for the error in the WinPivotGrid and how to solve this issue?

Thanks.

Parents
No Data
Reply
  • 6120
    Offline posted

    Hello Ars,

    I will create a sample to reproduce the KeyNotFoundException when opening Geographies row in PivotGrid. I will test this further and will post an update by end of day tomorrow.

    Please let me know if you have any questions.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer

Children
No Data