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 cube2. Add fact Sales Summary.Gross Profit as the measure3. Add dimension Organisation.Organisations as column header4. Add dimension Product.Product Categories as row header5. Open row drilldown All Products->Accessories6. Open column drilldown AdventureWorks Cycle->European Operations7. Add dimension Geography.Country as additional row header8. 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.
Hello Ars,
I followed the steps you suggested and was unable to reproduce the behavior you're describing. To test this I have used Adventure works standard edition database. I have run couple of complex queries on this sample and was not able to reproduce the exception you are mentioning.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem. The data source is added as a link to our sample data so you can run this sample as is.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version <2016.20162.1000> in .
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
Hi Sahaja,
thank you for you reply. I've downloaded you sample project and opened it using VS 2013 and received two messages. The first message required me to change the target framework for 4.5.2 to 4.5. The second message occurred after double click on the Forms.cs file to open the forms designer. The reason for the second message is that I only have version 16.1.20161.2148. Therefore, testing your project is not possible for me.
I've added my sample project were the issue occurs. I hope it helps to identify the problems.
Thanks and regards,
Michael
I have tried testing the multiple dimensions row header issue with the sample you have provided. However, when I run the sample I got a method not implemented exception. For your convenience, I have downgraded my sample to .NET framework 4.5. You can use 16.1.20161.1000 build to test my sample.
My sample is not loading the adomd database using 16.1.20161.2148. I have to investigate further to identify the cause of this issue.
Please get the 16.1.20161.1000 build and try to reproduce multiple dimensions row header issue in my sample and post it here. I will further look into this issue as soon as I hear back from you.
Please let me know if you have any questions.
I guess the method not implemented exception is caused by the data source error handler in line 26 of the From1.cs file.
Unfortunately, downgrading to 16.1.20161.1000 is not advisable because we had another issue with that version (see post Recognition of measures and dimensions in FlatDataSource) so we had to upgrade to 16.1.20161.2148.
Nevertheless, I've tried to test your project, connecting to your data source and received the following error message in the data source error handler:
Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException: The connection was interrupted or interrupted because of timeout. ---> System.Net.WebException: The remote server returned an error: (407) Proxy authentication required .bei System.Net.HttpWebRequest.GetResponse()bei Microsoft.AnalysisServices.AdomdClient.HttpStream.GetResponseStream()bei Microsoft.AnalysisServices.AdomdClient.HttpStream.GetResponseDataType()
--- End of stack trace ---
bei Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()bei Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility)bei Microsoft.AnalysisServices.AdomdClient.XmlaClient.Discover(String requestType, String requestNamespace, ListDictionary properties, IDictionary restrictions, Boolean sendNamespacesCompatibility)bei Microsoft.AnalysisServices.AdomdClient.XmlaClient.Discover(String requestType, ListDictionary properties, IDictionary restrictions, Boolean sendNamespacesCompatibility)bei Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.Discover(String requestType, IDictionary restrictions, InlineErrorHandlingType inlineErrorHandling, Boolean sendNamespaceCompatibility) bei Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ReadDataSourceInfo() bei Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)bei Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()bei Infragistics.Olap.Adomd.Core.AdomdDataProvider.DiscoverCatalogsAsync(IEnumerable`1 properties, IEnumerable`1 restrictions) bei Infragistics.Olap.Xmla.MdxDataSourceInternal.LoadCatalogs()bei Infragistics.Olap.Xmla.MdxDataSourceInternal.OnInitialize()bei Infragistics.Olap.OlapDataSourceInternal.Initialize()bei Infragistics.Olap.OlapDataSource.Initialize_Async()
InitializationFailed
So, testing against your data source seems not be possible.
Thanks and regards
I’m still working on this issue. I will post an update on this by end of day Thursday.
I was able to reproduce the KeyNotFound exception when opening the AllGeographies row drilldown using the sample you provided. I used AdventureWorks DW standard edition for my testing. Two steps that I did differently because of this database are to add Promotion Promotion as column header in step 3 and open AllPromotions in step6. However, this issue is already fixed in the latest version. I recommend getting 16.2.1000 or the latest version in order to resolve this issue.