Link to home
Create AccountLog in
Avatar of balabommala
balabommala

asked on

Load report failed in Visual Studio .NET 2002

Hello everybody out there,
I used Visual Studio .NET 2002 to build reports. It is a pure reporting application with around 25 reports. The reports are embedded. Iam using the bundled version of Crystal Reports.
I have created a setup program with around 6 merge modules( 4 merge modules+2 more because I am using ADO.NET datasets). When that setup program is installed on my friend's system, it runs fine. The problem is when I try to run the reports on the development server, I get the error “Load Report Failed”.

How can I make the report run after installation on the "user's" PC?  Please anybody help......

Please don't point me to any url's as I have done enough research. Don't point me to this link especially.
http://support.businessobjects.com/communityCS/TechnicalPapers/crnet_deployment.pdf

Thanks a mill.

 
 
Avatar of dylanyee
dylanyee

“Load Report Failed”... your application can't find and load the specified rpt file. but since you are using embeded report, you shouldn't be facing this problem.
May I know how did you call up your report to display? mind to show us your code?

dylan
Avatar of Mike McCracken
Is Crystal and VS installed on the development server?

mlmvv
Avatar of balabommala

ASKER

VS(I mean .NET Framework 1.0.3075 is installed) is installed on the development server. and Crystal comes with VS.NET right
This is how I was calling the report:
Any suggestions please.

Private Sub CallReport()
        'Dim stor_loc
        'stor_loc = Request.QueryString("storage")
        Dim objDS As DataSet
        objDS = GetFilings()
        ' Creating the XML file for design and report

        'objDS.WriteXmlSchema("C:\ReportsAllEmployeeStatistics.xml")

        ' Assigning the Dataset to the report
        oRpt.SetDataSource(objDS)
        objDS = Nothing
        'With CrystalReportViewer1
        '.ReportSource = oRpt
        '.BestFitPage = True

        '        End With

        Dim crExportOptions As ExportOptions
        crExportOptions = oRpt.ExportOptions
       
        With crExportOptions
            .FormatOptions = New PdfRtfWordFormatOptions()
            .ExportFormatType = ExportFormatType.PortableDocFormat
            .ExportDestinationType = ExportDestinationType.DiskFile
        End With

        Dim req As ExportRequestContext = New ExportRequestContext()
        req.ExportInfo = crExportOptions
        Dim st As System.IO.Stream
        st = oRpt.FormatEngine.ExportToStream(req)
        oRpt = Nothing
        Response.ClearContent()
        Response.ClearHeaders()
        Response.ContentType = "application/pdf"
        Dim b(st.Length) As Byte
        st.Read(b, 0, st.Length)
        Response.BinaryWrite(b)
        st.Close()
        st = Nothing
End Sub
Your code is not complete, you should have a line like
oRpt = new CrystalReport1() don't you?

dylan
I have that in another function.
This whole application is working in my system. But when i tryto deploy it on he development server, it doesn't.
Do I have to include Dbghelp.dll into my setup project?

Thanks
I don't think include DBghelp.dll will help. You could try it anyawy.
I still suspect that you didn't actally embedded your report with your project. From you report's property, did you change your Build Action to "Embedded Resource"?

dylan
By default, the reports Build Action property is set to Embedded resource right.
Anyways I checked my reports and all of them have enmedded resource as build action.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of dylanyee
dylanyee

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Thanks.
You ponited me to the right link.
glad I could help~

dylan