Skip to Content
0
Former Member
Apr 29, 2010 at 07:59 PM

"Load Report Failed" Error after upgrading to CR XI R2 and VS 2005

31 Views

Previously I had visual studio 2003 and crystal report XI and on my website project and I have this function where users can download their monthly statement. and it was working fine. here is my code of the function...

-


Private Sub cmdStatement_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStatement.Click

Dim pReport As New ReportDocument

pReport = New ReportDocument()

Try

'Dim pTable As Table

pReport.Load(Server.MapPath(".") & "\reports\MonthlyStatement.rpt")

pReport.SetDatabaseLogon(dbUser, dbPassword, dbServer, dbDatabase)

pReport.RecordSelectionFormula = "{CCMSC.CID}='" & mCID & "'"

Dim pArray() As String =

DataAccess.SqlPublic.ExecuteDataset(cnString, "webDownloadEStatement", pArray)

Response.ClearContent()

Response.ClearHeaders()

Response.ContentType = "application/pdf"

pReport.ExportToHttpResponse(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat, Response, True, "DebtHelper_" & mCID & "_MonthlyStatement")

pReport.Dispose()

Catch ex As Exception

divMessage.Visible = True

lblMessage.Text = ex.Message

Finally

pReport.Dispose()

End Try

End Sub

-


Now, recently I upgraded my crystal to CR XI Release 2 SP6 and also upgraded my web project to Visual Studio 2005 with .NET 2.0. and now it gives me "report load failed" error on the very first line pReport.Load(......)

The project has updated the references related to crystal reports to the 11.5 version from 11.0. Not sure what am I missing here.

I have also opened the report file in the new crystal and saved it. I also opened it in Visual Studio itself and saved it.

I would appreciate any help possible.

Thanks

Raj