I have a .net project using a crystal report. I am using VS2010 and targeting the .net 3.5 framework. Everything works on my development machine, but not on the production web server. I have installed the SAP Crystal Reports 32 bit redistributable package (SAP Crystal Reports runtime engine for .NET framework) on my web server.
I am still getting an exception saying "Type 'ReportDocument' is not defined."
Do I have to do anything other than install the redistributable to get my site to recognize the Crystal Reports objects such as 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.Extension开发者_JS百科s" 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>
You should include the following in the 'assemblyBinding' section either manually or by readding your references to CrystalDecision.
<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>
Sounds like you need to put CrystalDecisions.CrystalReports.Engine as a reference in your solution.
精彩评论