cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 'Load Report Failed' when trying to load .rpt file into VB.Net CrystalReportViewer Control

Former Member
0 Kudos

Getting 'Load Report Failed' when trying to load .rpt file into VB.Net CrystalReportViewer Control

(CrystalDecisions.Windows.Forms.CrystalReportViewer).

My app is written in VB.Net 2010 (Visual Studio 2010, 10.0.30319.1), using .Net Framework 3.5.

Within my app, I have a form with the CrystalReportViewer Control. The end user selects from a list of

.rpt files (Crystal Report files), and then a new instance of the form is instantiated, and the .rpt file

is loaded.

The environment this is happening in is a Windows Server 2003 R2, Standard x64 Edition, SP2.

The Crystal Reports 2008 Runtime is installed via the install file CRRedist2008_x86.msi. Our Apps

are 32-bit, so we use the 32-bit runtime. There are multiple servers that are supposed to all be

configured the same, but on some of the servers, when the user tries to launch the Crystal Report

.rpt file, they get the 'Load Report Failed' error on the call to

CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

The same Crystal Report .rpt file launches fine from other servers, so there must be some kind of

setup/security/registry setting issue, but the current error does not provide any information as to what that

is.

Is there some kind of logging that will help to isolate what the setup isssue is?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

CR 2008 is not supported with VS2010. Upgrade to Crystal Reports for Visual Studio 2010, update your CR references and retest.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

I did the following on a Windows XP Professional SP3 machine.

I uninstalled the Crystal Reports 2008 SP1, which removed the 10.0.nnnn.n versions of the following from the c:\Windows\assembly directory:

CrystalDecisions.CrystalReports.Engine

CrystalDecisions.ReportSource

CrystalDecisions.Shared

CrystalDecisions.Windows.Forms

I downloaded and installed the file CRRuntime_32bit_13_0_4.msi. This gave me an entry in the Add/Remove Programs called: SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit). No new versions of the CrystalDecisions files listed above were installed to the c:\Windows\assembly directory.

I then started Visual Studion 2010, and opened by VB.Net project, which has a target .NET Framework of 3.5. I mention this, becuase the Crystal Reports runtime engine says it is for .NET Framework 4.0, which is why we did not go with this runtime install eight months ago when we first deployed. The 2008 runtime has worked in most cases. We just have several Citrix servers which it will not work on (see error I reported in my first posting). So anyway, in the References of by VB.NET project, I had to remove the references to the CrystalDecisions files listed above, because these were all pointing to the 10.0.nnnn.n version, which no longer exist.

My problem is, I need to add the references back for the CrystalDecisions files, using the new versions installed by the CRRuntime_32bit_13_0_4.msi install, but I cannot find what the file names are or where they were installed to. They are not in the c:\Windows\assemby directory.

What is the name of the CrystalDecisions files, and what version am I looking for? Can I use these with a VB.Net project which has a Target 3.5 .NET Framework? If no, then I am back to the original question of why the 2008 runtime works on most of my customer machines, but not on some. What kind of Windows logging can I setup to diagnosis why it does not work on some machines?

Below is my VB.Net code which loads a Crystal Report .rpt file into the Crystal Reports Viewer. If the name of theCrystalDecisions files has changed, will all my method calls and property references in the code below have to change? If yes, is there documentation which will tell me what the equivalent calls are for the new version?

Private Sub CrystalReportViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

CrystalReportViewer.Load

Dim ReportTables As CrystalDecisions.CrystalReports.Engine.Table

Dim ReportTableCurrent As CrystalDecisions.Shared.TableLogOnInfo

Dim ODBCDSN As String

Dim DisplayReportName = mReportName

Dim

Report As New ReportDocument()

Report.Load(mReportName)

For Each ReportTables In Report.Database.Tables

     ReportTableCurrent = ReportTables.LogOnInfo

     With ReportTableCurrent.ConnectionInfo

          .ServerName = ODBCDSN

          .UserID = mUserName

          .Password = mPassword

     End With

     ReportTables.ApplyLogOnInfo(ReportTableCurrent)

Next ReportTables

CrystalReportViewer.ReportSource = Report

Me.Text = "Crystal Report Viewer - " & DisplayReportName

Me.CenterWithRespectTo(Forms.MDI)

End Sub

former_member183750
Active Contributor
0 Kudos

In order to integrate CR into VS 2010, you have to run the install file, not the MSI runtime file. The downloads are here:

http://scn.sap.com/docs/DOC-7824

The above has a link to the install file.

For SP3:

http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_3.exe

For SP4:

http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_4.exe

Note(!). If you are working with a web app, or will be in the near future (3 months or so until SP5 releases), use SP3 as SP4 has a rather nasty issue with the web viewer.

Oh and just to be sure, before running the install exe, uninstall the MSI runtime.

- Ludek

Answers (0)