Click here to Skip to main content
15,795,331 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a C# windows application which consists of a crystal report.
It runs successfully while run is normal.

But, after converting that solution in to a setup file, I got an error
"load report failed"

please help me to solve this problem

thanks in advance
Updated 17-Nov-10 23:32pm
Dalek Dave 18-Nov-10 4:32am    
Edited for Grammar and Syntax.

1 solution

Do you mean you are getting error while creating setup? or after installed by the setup file?

"load report failed"

This error occurs by following scenarios.

Invalid File path
Invalid File name
make sure the IIS user has permissions to access the file at that location
No access for C:\Windows\Temp directory in Server, ASPNET machine accoutnt to be added to the Temp directory
If possible delete unwanted files in your Temp Directory

or you have to specify username and password attributes for <identity> tag in Web.config file for identifying the IIS Authenticated Account or User
<identity impersonate="true" userName="accountname" password="password" />

So try these things & after then you face the same issue then come here with full details along with exception message.

For Setup creation with Crystal Report

How to Crystal Report Merge Module [^]
Share this answer
krishnaspmoorthy 18-Nov-10 1:38am    
No need to add the Crystal report. Just add Pre-requisite for the Crystal report during Deployment.
sambritto 18-Nov-10 3:55am    
thanks raja,,,

after completing my process

i have error dialogue box ,while click details displayed as follows

\See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the path specified.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
at pharamacy.mainstkreport.mainstock()
at pharamacy.mainstkreport.mainstkreport_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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 **************
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
Assembly Version:
Win32 Version:
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/mssetup/pharamacy.exe
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/
thatraja 18-Nov-10 4:08am    
Hi sambritto, I never created setup for windows applications with crystal reports(I was created setups alone for applications) since I'm mostly working in web applications. Check my updated answer for setup creation with crystal report.
sambritto 18-Nov-10 4:22am    
thanks raja.....
thatraja 18-Nov-10 4:26am    
You welcome

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