Problem with Crystal Reports and Click Once Deployment

Caraldur

Member
Joined
Oct 23, 2009
Messages
19
Programming Experience
Beginner
Hello everyone,

I have written an application using VS 2008 Visual Basic, that uses a couple of Crystal Reports and I'm having issue with the reports not being found when the app is deployed. When I create an msi file using the setup project the application works as intended, but when I publish the main application using a network shared folder the application install properly. My problem is that when I try to open a report I get an error that the file is not found.

My guess is the reports are not getting installed with the program and I have no idea how to do that. If someone can point me in the right direction I would appreciate it. The error message is below.

Thanks in advance for the help.

VB.NET:
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 SteinmetzInventoryManagement.frmShippedSortPart.loadReport()
   at SteinmetzInventoryManagement.frmShippedSortPart.btnFetch_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)
 
I've never seen any publishing options that should the include files. Unless you are talking about the Project properties-> publish tab there is an options button there but that doesn't show the included files.

I did add a reference path to the folder containing the reports but that didn't seem to work. I also can't find the install path for the application.
 
lol, I have clicked that button and I have seen the list of files included but there is no way to add more files to the list that I can seen. Can you tell me how to get files added to that list. I have tried adding resources using the resource tab but that isn't working either.
 
I figured it out. I had to set each report's properties: Build action to Content and Copy to Output directory to Copy Always. Your sarcasm pointed me in the right direction, Jim. :) Thanks for the help I appreciate it.

-Car
 

Latest posts

Back
Top