0

我已经使用 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 [HKLM\Software\Microsoft\Fusion!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 [HKLM\Software\Microsoft\Fusion!EnableLog].

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

4

1 回答 1

0

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

于 2013-01-31T05:10:17.150 回答