Hi friends,
i have deploy a VB.net application which have crystal report in it. the
application is running well but when i open the form with Crystal
report its giving me error. Please help
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.InvalidOperationException: An error occurred creating the form.
See Exception.InnerException for details. The error is: The type
initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument'
threw an exception. ---> System.TypeInitializationException: The
type initializer for
'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an
exception. ---> System.IO.FileNotFoundException: Could not load file
or assembly 'CrystalDecisions.ReportAppServer.CommLayer,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
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].
--- End of inner exception stack trace ---
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
at RayInvoice.InvoicePrint..ctor()
at RayInvoice.Form1.InitializeComponent()
at RayInvoice.Form1..ctor()
--- End of inner exception stack trace ---
at RayInvoice.My.MyProject.MyForms.Create__Instance__[T](T Instance)
at RayInvoice.invoice.Button3_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)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RayInvoice
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/.NET/Pal/RayInvoice.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CrystalDecisions.Windows.Forms
Assembly Version: 10.2.3600.0
Win32 Version: 10.2.51014.0
CodeBase: file:///C:/Program%20Files/.NET/Pal/CrystalDecisions.Windows.Forms.DLL
----------------------------------------
CrystalDecisions.CrystalReports.Engine
Assembly Version: 10.2.3600.0
Win32 Version: 10.2.51014.0
CodeBase: file:///C:/Program%20Files/.NET/Pal/CrystalDecisions.CrystalReports.Engine.DLL
----------------------------------------
CrystalDecisions.Shared
Assembly Version: 10.2.3600.0
Win32 Version: 10.2.51014.0
CodeBase: file:///C:/Program%20Files/.NET/Pal/CrystalDecisions.Shared.DLL
----------------------------------------
CrystalDecisions.ReportSource
Assembly Version: 10.2.3600.0
Win32 Version: 10.2.51014.0
CodeBase: file:///C:/Program%20Files/.NET/Pal/CrystalDecisions.ReportSource.DLL
----------------------------------------
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

CrystalDecisions.CrystalReports.Engine.ReportDocument
vaishali.mspp
I think this is probably the best place to start looking: it sounds like there is an assembly missing from your machine. You could also try a repair of the Crystal Reports install, or even uninstalling it and then re-installing it.
The following article from Business Objects may help: http://support.businessobjects.com/library/kbase/articles/c2016508.asp
toby1980
Having the same problem as well, tried to remove and replace setup application dependant files associated with Crystal Reports:
CrystalDecisions.CrystalReports.Engine.dll
CrystalDecisions.ReportSource.dll
CrystalDecisions.Shared.dll
CrystalDecisions.Web.dll
CrystalDecisions.Windows.Forms.dll
These files were not added as dependant files even though they have been set in the references portion of the application. It was necessary to add them manually. The application, when running, gets a little bit farther, but as soon as you call Crystal Reports assembly in application, hard exception and the application closes, with a send report request on death.
Here is the exception error message that is dropped at time of death:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
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].
--- End of inner exception stack trace ---
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
at LabelPrintingSystem.UI.Certification..ctor()
at LabelPrintingSystem.UI.LabelPrintForm.PrepareReport()
at LabelPrintingSystem.UI.LabelPrintForm.toolStripButton1_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.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)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
LabelPrintingSystem
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/Tannehill%20Printing%20System/LabelPrintingSystem.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
PickDB
Assembly Version: 1.5.0.25680
Win32 Version: 1.5.0.25680
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/Tannehill%20Printing%20System/PickDB.DLL
----------------------------------------
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine
Assembly Version: 10.2.3600.0
Win32 Version: 10.2.51014.0
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/Tannehill%20Printing%20System/CrystalDecisions.CrystalReports.Engine.DLL
----------------------------------------
CrystalDecisions.Shared
Assembly Version: 10.2.3600.0
Win32 Version: 10.2.51014.0
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/Tannehill%20Printing%20System/CrystalDecisions.Shared.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Hope this helps someone figure out what the problem may be...
DLS
Db88Master
No, I wouldn't expect your scenario to work, Dodge. You are not supposed to package Crystal Reports assemblies with your ClickOnce application. That work that was done to publish each referenced assembly It would have been better to make it impossible. This is because Business Objects (and presumably other vendors) doesn't want people to package and redistribute individual assemblies. First of all, package vendors have the most knowledge about how to correctly install their assemblies. Second, redistributing individual assemblies creates a servicing nightmare.
Dodge, you need to make sure that Crystal Reports is installed on the end-users machine. This can be done via the bootstrapper. See the Prerequistes dialog off of the publish page.
Hans Yadav
codecamel
Same problem occurs with me.
Why Microsoft is not giving a comprehensive deployment solution for all the development tools it had developed.
Development tools with Microsoft are one of the best available in the market but the only drawback with it is you cannot deploy your developed application to any machine saying it was 100 % successfull.
That the major reason why most of the developer leaving Microsoft development tools and going for others as if your application can't be successfully deployed on a machine all your efforts are useless.
I hope if this continues Microsoft will find itself out of the software development market in immideate future.
jdiazbejJuan
metaza
Nope.
The Crystal report is generated by Client application on client computer. Service is .NET remoting and is only communicating with Oracle - nothing more.
Alin Constantin
Do you know where in your code you are using the CrystalDecisions.ReportAppServer.CommLayer assembly
Did you install CrystalReports for .NET Framework 2.0 on the test machine
troff
Hello!
Sure.
It's a windows forms application in two parts. One part is service, which is running on the server, the second part is a client application. The client application reads data from Oracle base, makes XML file, which contains data for the Crystal Report.
It's all running ok on my computer, but when I publish my client application by Click once on my test computer, the error pops up. Click once also installs Framework 2.0. and Click Once if there is none on computer.
Thank you. :)
peachy4
zeffy
I have the same problem.
Any Help
eatbingo
I use Crystal Reports XI myself, so there may be a difference with Crystal Reports in Visual Studio in terms of assemblies, though I'm not so sure. I recently deployed a WinForm App to a user with no Crystal Reports DLL files registered on the machine, and installing Crystal Reports for .NET Framework 2.0 was sufficient.
Go to c:\windows\assembly on the test machine and check to see if you can find CrystalDecisions.ReportAppServer.CommLayer there. I would check both the test computer that doesn't work and the one that does. Based on your error message, my hunch is that you are missing it on the one that doesn't work but have it on the one that does.
Monkey Boy
Hello!
Have same problem. Did anyone find solution
Thank you.
Moura
Application is installed on my test computer by ClickOnce and Crystal report is marked as prerequisite. Also if I check installed programs in Add and Remove Programs I can se "Crystal Reports for .NET Framework 2.0. x86"
I don't know where in my code I use assembly your asking about.
I never worked with crystal report before. I just made crystal report in Visual Studio using wizard, I made a form with a Crystal report viewer nad displayed the report.
The funny thing is, that the reports are working on another test machine. I don't know what is the difference between them...