visual studio 2010 - Crystal Report exception



我用 Crystal Reports 10 开发了一个项目,并开发了一个可以正常工作的设置,可以很好地生成 pdf 文件,但是当我在任何其他机器上安装此应用程序并尝试运行 pdf 生成时,我得到这个异常:

有关调用的详细信息,请参阅此消息的末尾实时 (JIT) 调试,而不是此对话框。

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.CrystalReports.Engine, Version=10.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at WindowsApplication1.frmPaySlip.ShowReportSalaryStatement(DataSet ds, String toadd, String rep)
at WindowsApplication1.frmPaySlip.pdfgenerator(String rep, String toadd)
at WindowsApplication1.frmPaySlip.btnOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

我几乎尝试了我在网上找到的所有可能性,但无法解决。

我解决了这个问题。水晶报告的引用是指另一个版本的dll,因此它在机器中工作正常,并为其他机器抛出错误。我清除了所有参考并参考了水晶报告的所有 dll 并重建设置,现在工作正常

最新更新