Hi,
I am trying to edit the Infragistics WPF PivotGrid Sample so that it will connect to the ActivePivot Sandbox Server. ActivePivot supports XMLA and I can connect to the same Sandbox Server using the 'From Analysis Services' DataSource option in MS Excel with no issues. I edited the odc file to match the exact same connection string as below and it sill worked.
In the DataSourceAdomdNet.xaml file in the Infragistics.Samples.WPF project, I replaced the AdomdDataSource with the following:
<igOlap:AdomdDataSource x:Key="AdomdDataSource" Database="Sandbox" Cube="EquityDerivativesCube"> <igOlap:AdomdDataSource.ConnectionSettings> <igOlap:AdomdConnectionSettings ConnectionString="Password=admin;Persist Security Info=True;User ID=admin;Initial Catalog=Sandbox;Provider=MSOLAP.4;Persist Security Info=True;Data Source=http://localhost:8080/xmla;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error" /> </igOlap:AdomdDataSource.ConnectionSettings> </igOlap:AdomdDataSource>
When I run the Samples project and look at the PivotGrid, I see the following exception:
InnerException: System.InvalidCastException HResult=-2147467262 Message=Object cannot be cast from DBNull to other types. Source=mscorlib StackTrace: at System.DBNull.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ToDateTime(Object value, IFormatProvider provider) at Microsoft.AnalysisServices.AdomdClient.CubeDef.get_LastProcessed() at Infragistics.Olap.Adomd.AdomdDataProvider.LoadCubesWorkerDoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) InnerException:
I am experienced with ActivePivot, but not so much with Infragistics/ADOMD.NET. I have never seen this type of error when using any other XMLA/ADOMD client.
Can anyone help?
Thanks
p.s. i originally asked this question on stackoverflow: http://stackoverflow.com/questions/27846489/infragistics-adomd-classcastexception-when-connecting-to-activepivots-xmla-serv
Hello David,
Thank you for your post. I have been looking into it and since this is not a known issue, it will be great if you could send us an isolated sample project, where the issue is reproduced, so we can investigate it further for you.
Looking forward for your reply.
I will see what I can do. We can provide the code sample (it's literally just the change as mentioned in the post), but it may be more difficult to provide you with an instance/connection of/to the AcitvePivot Sandbox (it requires a license).
We can provide a link to one of the ActivePivot online demo cubes. Can I PM it to you as it would be better not to make it public?
I created a private ticket for you (CAS-149503-V4D3F0) you can send the link there.