Problem w/Viewing crystal reports

James

Well-known member
Joined
Oct 3, 2002
Messages
78
Does anyone know why I get the following error when I try to view a web form with a CrystalReportView control?

Server Error in /WylePricingSystem Application.
--------------------------------------------------------------------------------

Load report failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load report failed.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[LoadSaveReportException: Load report failed.]
CrystalDecisions.Web.ReportAgent.j()
CrystalDecisions.Web.ReportAgentBase.set_ReportSource(Object value)
CrystalDecisions.Web.ReportAgent.set_ReportSource(Object value)
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSource(Object value)
ASP.WebForm1_aspx.__DataBindCrystalReportViewer1(Object sender, EventArgs e) in http://station5/WylePricingSystem/WebForm1.aspx:14
System.Web.UI.Control.OnDataBinding(EventArgs e)
System.Web.UI.Control.DataBind()
WylePricingSystem.WebForm1.Page_Load(Object sender, EventArgs e) in I:\WylePricingSystem\WebForm1.aspx.vb:22
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0



Please help,

James
 
I have the same issue after "resolving" the keycode error by adding several merge modules. My ReportAgent fails loading the report.

Does anyone have a clue about this one?
 
Hmm - me too. All of the above is VERY familiar.

If I find the answer Ill try to remember to come back. Im assuming that you guys are still just hangin waiting for an answer?
 
Here is what I did when I encountered this load report problem ...

I faced a similar problem.

In my scenario when I ran the application from where the source was installed, it worked fine.

But when I deployed the application via an installer, then this error showed up.

The solution was to select all the .rpt files in the project, view their properties and select the Build action property to Content instead of Embedded resource. This caused the installer deployed application to work as well.

I hope this helps.

Regards,

Shahid H Faruqi
Software Engineer
 
Sorry, I try to post the solutions to my problems. I guess I forgot this time. I use two methods to view crystal reports. 1 through the crystalreportviewer and the other through crystal report engine. I will give examples of both. The crystal report engine example display in PDF format so a user can print a clean report. Also, I am passing parameters to the report attached. Hope this helps. The code is attached since it exceed the character limit in this text area.


James
 

Attachments

I am suffering this error as well. "Load Report Failed". I did take the advise posted by ShahidHFaruqi, but no change, still get error. I did use the latest Regwiz , ie. Crystal_regwiz2003.msm with correct license code (mine is a .NET 2003 project).
Any new or additional items to try on this from anyone?
 
Did you look at the attached text file on the previous post? This should show you how to get your report working two different ways. The problem could be your report source property. If this doesnt help reply with another post and Ill try to help.

James
 
Yes I did. Lot of code here and my report is assembled in the exe. I thought the issue solved with the code was the report not working for the web app. My problem this time is with a simple windows application so no web reference is involved.

This app is very simple. Simply a windows vb app to display or print a crystal report file . I have a simple form with the Crystal reports control referencing an rpt file. I changed the build action property to "content" but to no avail. ReportSource is simply set to the rpt file name.

At this point I am at a loss for what to try next, still researching, if I find it first I will definitely post the answer here.
 
I have solved the "Load Report Failed" for my application. I am going to post solution here in case it will help solve issues for some.

The ReportSource property in the property sheet of the report should not be used. It stores the complete path even in the deployed
application. Not as you would expect. Logically this should be a developer IDE location and be resolved in the distributable, not
hard coded in the app, but that is how they did it. Here is a small snippet of code from my form that I place in the Windows generated
code after the InitializeComonent() including my logon code. My report is set to a Build Action of embedded.

In the General Declarations add the following

Required CR assemblies
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared


At top of the form class add the following after the Inherits :

CR Variables
Dim crReportDocument As AuditDailyChangesToNameReport
Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crTableLogOnInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo


After the InitializeComponent() add the following :

Create an instance of the strongly-typed report object
crReportDocument = New MyReportName

Setup the connection information structure to be used
to log onto the datasource for the report.
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "MYSERVER" physical server name
.DatabaseName = "MYDATABASE"
.UserID = "USERID"
.Password = "PW"
End With

Get the table information from the report
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables

Loop through all tables in the report and apply the connection
information for each table.
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next

Me.CrystalReportViewer1.ReportSource = crReportDocument


End Sub


Hope this is helpful.
 
C# - Have Load Report failed on win98

Im writing a c# desktop application, using CrystalReports. It works fine on WinXP and supposedly well enough on Win2000, but i have that "Load report Failed" problem on win98. Itried several approaches. With an external .rpt file, with an embedded .rpt and nothing so far. I read the document about this thing on the CrystalDecisions site: http://support.crystaldecisions.com/library/kbase/articles/c2011640.asp

The strange thing was that the regsvr32 executable from win (* refused to work with crqe.dll so i used the one i found in WinXP. Never the less i still get that annoying message.

Can anyone Help?

10x in advance
 
Did you also try the ATL.dll ?

ie. The second section :
If CRQE.dll will not register or does successfully register and the problem persists, check the version of the ATL.dll on the client computer. The correct version of ATL.dll for Windows 98/ME is 3.0.8449.

I have not yet done a 98 test but will be doing one this week. Will post if I find anything.
 
Yes i did. Besides i have installed IE6 before that. Even loaded the atl.dll with regsvr32. But the report still says load report failed.
 
Solution

Hopefully everyone has figured it out by now.

If you are using an embedded Crystal Report, C# creates a hidden class with the same name. You can just set the ReportSource property of the CrystalReportViewer to an instance of the class. For example:

If your report is CrystalReport1.rpt
and your CrystalReportViewer is crystalReportViewer1

add the following line to your code:

crystalReportViewer1.ReportSource = new CrystalReport1();
 
By the way, Visual Basic does the same thing.

Use:

CrystalReportViewer1.ReportSource = New CrystalReport1()
 
I tried all the above solution and no one seems to work with my app. It is a simple windows app whit a simple CrystalReportViewer . On development machine (win server 2003) it works fine but in win 98 SE i still get this annoing bug. The Crystal help from

http://support.crystaldecisions.com/library/kbase/articles/c2011640.asp

it dosn t work (I hate them for that stupid bug). The crqe.dll refuze to register.

I will try to resolve it with this new solution form crystal

http://support.crystaldecisions.com/library/kbase/articles/c2013420.asp

I promise to come back to let you know how it worked


Can anyone know how can i resolve that ???
Please help im in a very hard pressure here with one client!
Thx alot all of you for that posts
 
It sounds like a lot of people are having dll problems with Crystal Reports.

Crystal Reports provides Merge Modules (*.msm) to make sure that everything is properly installed.

Include the following files in your setup project and everything should be fine:

Crystal_Managed2003.msm
Crystal_Database_Access2003.msm
Crystal_Database_Access2003_enu.msm
Crystal_regwiz2003.msm

They are typically found here:

C:\Program Files\Common Files\Merge Modules

If you have an older version of Crystal Reports they may have different names.
 
this stupid dll is not in that merge modules
the problem is about an app running on win 98
did u visit de link i have submited ?
 
Back
Top