我正在尝试编辑Infragistics WPF PivotGrid示例,以便它将连接到ActivePivot沙盒服务器。 ActivePivot支持XMLA,我可以使用MS Excel中的“From Analysis Services”DataSource选项连接到同一个Sandbox Server,没有任何问题。我编辑了odc文件以匹配下面完全相同的连接字符串,并且它已经工作了。
在Infragistics.Samples.WPF项目的DataSourceAdomdNet.xaml文件中,我将AdomdDataSource替换为以下内容:
<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>
当我运行Samples项目并查看PivotGrid时,我看到以下异常:
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:
我对ActivePivot很有经验,但与Infragistics / ADOMD.NET没那么相关。在使用ActivePivot的任何其他XMLA / ADOMD客户端时,我从未见过这种类型的错误。
有人可以帮忙吗?
由于