' CrystalDecisions.CrystalReports.Engine.ReportDocument'抛出一个例外

时间:2015-07-07 14:28:39

标签: c# crystal-reports

当我尝试在另一个表单上查看我的报告时,我收到此错误。

你可以帮我解决这个错误吗?另一点是表单在我的电脑上工作正常。

这是错误

System.TypeInitializationException: 'CrystalDecisions.CrystalReports.Engine.ReportDocument' tür başlatıcısı özel durum döndürdü. ---> System.TypeInitializationException: 'CrystalDecisions.Shared.SharedUtils' tür başlatıcısı özel durum döndürdü. ---> System.IO.FileNotFoundException: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' dosyasını veya derlemesini ya da bağımlılıklarından birini yükleyemedi. Sistem belirtilen dosyayı bulamıyor.
   konum: CrystalDecisions.Shared.SharedUtils..cctor()
   --- İç özel durum yığını izlemesinin sonu ---
   konum: CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture()
   konum: CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(String name)
   konum: CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()
   konum: CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
   --- İç özel durum yığını izlemesinin sonu ---
   konum: CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
   konum: CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
   konum: WindowsFormsApplication1.irsaliye..ctor()
   konum: WindowsFormsApplication1.irsaliyeyazdir.InitializeComponent()
   konum: WindowsFormsApplication1.irsaliyeyazdir..ctor()
   konum: WindowsFormsApplication1.Satis.linkLabel1_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e)
   konum: System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
   konum: System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   konum: System.Windows.Forms.Control.WndProc(Message& m)
   konum: System.Windows.Forms.Label.WndProc(Message& m)
   konum: System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Yüklü Derlemeler **************
mscorlib
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.18449 built by: FX451RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
BK Stok Takip v1.0
    Derleme Sürümü: 1.0.0.0
    Win32 Sürümü: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/BK%20Incorporated/BK%20Stok%20Takip%20v1.0/BK%20Stok%20Takip%20v1.0.exe
----------------------------------------
System.Windows.Forms
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.34250 built by: FX452RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.18022 built by: FX45RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Data
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.18046 built by: FX45RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.18058 built by: FX45RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks.Vs
    Derleme Sürümü: 10.0.0.0
    Win32 Sürümü: 11.0.50727.1
    CodeBase: file:///C:/Program%20Files%20(x86)/BK%20Incorporated/BK%20Stok%20Takip%20v1.0/Microsoft.VisualBasic.PowerPacks.Vs.DLL
----------------------------------------
System.Transactions
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Data.resources
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.18010 built by: FX45RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/System.Data.resources.dll
----------------------------------------
Microsoft.VisualBasic
    Derleme Sürümü: 10.0.0.0
    Win32 Sürümü: 11.0.50709.17929 built by: FX45RTMREL
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms.resources
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine
    Derleme Sürümü: 13.0.2000.0
    Win32 Sürümü: 13.0.5.891
    CodeBase: file:///C:/Program%20Files%20(x86)/BK%20Incorporated/BK%20Stok%20Takip%20v1.0/CrystalDecisions.CrystalReports.Engine.DLL
----------------------------------------
CrystalDecisions.Shared
    Derleme Sürümü: 13.0.2000.0
    Win32 Sürümü: 13.0.5.891
    CodeBase: file:///C:/Program%20Files%20(x86)/BK%20Incorporated/BK%20Stok%20Takip%20v1.0/CrystalDecisions.Shared.DLL
----------------------------------------
CrystalDecisions.Windows.Forms
    Derleme Sürümü: 13.0.2000.0
    Win32 Sürümü: 13.0.5.891
    CodeBase: file:///C:/Program%20Files%20(x86)/BK%20Incorporated/BK%20Stok%20Takip%20v1.0/CrystalDecisions.Windows.Forms.DLL
----------------------------------------
CrystalDecisions.ReportAppServer.CommLayer
    Derleme Sürümü: 13.0.2000.0
    Win32 Sürümü: 13.0.5.891
    CodeBase: file:///C:/Program%20Files%20(x86)/BK%20Incorporated/BK%20Stok%20Takip%20v1.0/CrystalDecisions.ReportAppServer.CommLayer.DLL
----------------------------------------
System.Web
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.34248 built by: FX452RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
mscorlib.resources
    Derleme Sürümü: 4.0.0.0
    Win32 Sürümü: 4.0.30319.18010 built by: FX45RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------

************** JIT Hata Ayıklama **************
JIT hata ayıklamayı etkinleştirmek için, bu uygulamanın veya
bilgisayarın (machine.config) .config dosyasında
system.windows.forms bölümünde jitDebugging değeri ayarlanmış olmalıdır.
Ayrıca uygulama hata ayıklama etkin durumdayken derlenmiş
olmalıdır.

Example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

此外,我的电脑和目标电脑是同一台电脑。但即使是同一台计算机,它也无法在目标计算机上运行。

1 个答案:

答案 0 :(得分:0)

TL;DR 在您要部署到的服务器上安装来自 SAP 的 Crystal Reports 运行时。

对于我想我会分享的后代,很可能您没有/没有在您正在运行的客户端或服务器上安装正确的 Crystal Reports 运行时。我猜你确实/确实在你的开发箱上安装了它,这就是它在本地工作而不是在服务器上工作的原因。至少在旧版本的 Crystal 中,我不知道如何在您的项目中引用和部署 DLL。

该例外的关键部分是:

<块引用>

CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()