Crystal Reports - Load Report Failed error
Posted on 2006-10-26
VS Studio 2005 Professional
I am in the process of releasing an application for sale. I have created the setup files for the application with prerequisites included. I followed the BusinessObjects instructions on adding a merge module into my setup. Very straightforward. I added the file 'CrystalReportsRedist2005_x86.msm' which in turn added the files 'Microsoft_VC80_ATL_x86.msm' & 'policy_8_0_Microsoft_VC80_ATL_x86.msm' under Dependencies. I have executed the program where I am using the following:
SQL Server 2005 Express
Crystal Reports for VB 2005
I ran the setup.exe where it installed all of the above and am able to perform all functions I want within my app except running a CR report. I'm getting the error below about not being able to find a file. I have embedded CR reports in the application. I originally had a path included as shown below where I've commented it out but I took it out prior to re-building my executable.
Error I received........
System.Exception: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the file specified.
Public Class ReportView
Private Sub ReportView_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim docReport As New ReportDocument
'' Commented !! docReport.Load(glRootDirectory & glReportName)
CrystalReportViewer1.ReportSource = docReport
Private Sub Form_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
glReportName = ""
I am completely oblivious to the problem. And to make it worse I was going to install my program today at a customer site.