我有一个使用水晶报告的.net项目。我正在使用VS2010并以.net 3.5框架为目标。一切都适用于我的开发机器,但不适用于生产Web服务器。我已在Web服务器上安装了SAP Crystal Reports 32位可再发行组件包(用于.NET框架的SAP Crystal Reports运行时引擎)。
我仍然得到一个例外,说“未定义类型'ReportDocument'。”
除了安装可再发行组件以使我的站点能够识别Crystal Reports对象(例如ReportDocument)之外,我还需要做任何其他事情吗?
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\HttpModules;bin\Providers;bin\Modules;bin\Support;" />
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
<bindingRedirect oldVersion="2008.0.0.0-2020.0.0.0" newVersion="2010.02.0713.35" />
</dependentAssembly>
</assemblyBinding>
</runtime>
答案 0 :(得分:1)
您应该手动或通过阅读对CrystalDecision的引用在“assemblyBinding”部分中包含以下内容。
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" culture=""/>
<bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" culture=""/>
<bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.ReportSource" publicKeyToken="692fbea5521e1304" culture=""/>
<bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.Web" publicKeyToken="692fbea5521e1304" culture=""/>
<bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.Enterprise.Framework" publicKeyToken="692fbea5521e1304" culture=""/>
<bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.Enterprise.InfoStore" publicKeyToken="692fbea5521e1304" culture=""/>
<bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
</dependentAssembly>
答案 1 :(得分:0)
听起来您需要将CrystalDecisions.CrystalReports.Engine作为解决方案中的参考。