Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am developing an application in C#. I used crystal report to do the printing job. I had to define custom paper size in control panel for the printer and use them to print my reports. On my own computer the application works flawless but on others it generates an exception when trying to print. I define the same paper size in the end-user system before doing the printing job. It drives me crazy. Please Help.

This is the exception:
http://www.Free-Picture-Host.com/images/XmH95r1275876672.jpg[^]
This is the text of exception detalis.
MSIL
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
CrystalDecisions.CrystalReports.Engine.LogOnException:
Error in File C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_d09eac8e-f400-41fb-a75c-474eddecfdc7 {7507FAC7-BF51-47D7-9B69-B09F263EA2CF}.rpt:
Unable to connect: incorrect log on parameters. ---> System.Runtime.InteropServices.COMException (0x8004100F):
Error in File C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_d09eac8e-f400-41fb-a75c-474eddecfdc7 {7507FAC7-BF51-47D7-9B69-B09F263EA2CF}.rpt:
Unable to connect: incorrect log on parameters.
   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
   --- End of inner exception stack trace ---
   at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
   at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
   at CheckNegar.frmPreview.button9_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.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CheckNegar
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/CheckNegar/CheckNegar/CheckNegar.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    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.1433 (REDBITS.050727-1400)
    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.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.21022.8 built by: RTM
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
JntMsgBox
    Assembly Version: 1.0.0.1
    Win32 Version: 1.0.0.1
    CodeBase: file:///C:/Program%20Files/CheckNegar/CheckNegar/JntMsgBox.DLL
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    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.1433 (REDBITS.050727-1400)
    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.1433 (REDBITS.050727-1400)
    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.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
AutumnalCalendar
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/CheckNegar/CheckNegar/AutumnalCalendar.DLL
----------------------------------------
CrystalDecisions.Windows.Forms
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Windows.Forms/10.5.3700.0__692fbea5521e1304/CrystalDecisions.Windows.Forms.dll
----------------------------------------
CrystalDecisions.Shared
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Shared/10.5.3700.0__692fbea5521e1304/CrystalDecisions.Shared.dll
----------------------------------------
CrystalDecisions.ReportSource
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportSource/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportSource.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/10.5.3700.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
----------------------------------------
CrystalDecisions.ReportAppServer.CommLayer
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll
----------------------------------------
CrystalDecisions.ReportAppServer.ClientDoc
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll
----------------------------------------
CrystalDecisions.ReportAppServer.DataSetConversion
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll
----------------------------------------
CrystalDecisions.ReportAppServer.DataDefModel
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll
----------------------------------------
CrystalDecisions.ReportAppServer.Controllers
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll
----------------------------------------
CrystalDecisions.ReportAppServer.ReportDefModel
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll
----------------------------------------
CrystalDecisions.KeyCode
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.KeyCode/10.5.3700.0__692fbea5521e1304/CrystalDecisions.KeyCode.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------
CrystalDecisions.Enterprise.InfoStore
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.268
    CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.Enterprise.InfoStore/10.5.3700.0__692fbea5521e1304/CrystalDecisions.Enterprise.InfoStore.dll
----------------------------------------
crdb_adoplus
    Assembly Version: 10.0.3300.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/Program%20Files/Business%20Objects/Common/2.8/bin/crdb_adoplus.dll
----------------------------------------
msvcm90
    Assembly Version: 9.0.21022.8
    Win32 Version: 9.00.21022.8
    CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375/msvcm90.dll
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
CrystalDecisions.Enterprise.Framework
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.268
    CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.Enterprise.Framework/10.5.3700.0__692fbea5521e1304/CrystalDecisions.Enterprise.Framework.dll
----------------------------------------
CrystalDecisions.Web
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Web/10.5.3700.0__692fbea5521e1304/CrystalDecisions.Web.dll
----------------------------------------
CrystalDecisions.ReportAppServer.XmlSerialize
    Assembly Version: 10.5.3700.0
    Win32 Version: 10.5.0.1943
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.XmlSerialize/10.5.3700.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.XmlSerialize.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.
Posted
Updated 6-Jun-10 18:30pm
v2

1 solution

MortezaCoder wrote:
incorrect log on parameters.


You have used a credential in report, either to connect to DB and get data or for connecting it to printer and get print. The credentials used are different on server from your personal computer. Check that part. Rest of the error details are because of JIT. Main issue is logon parameters. make sure you have all Crystal stuff installed on your server too (just like you have on your system)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900