By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,432 Members | 790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,432 IT Pros & Developers. It's quick & easy.

Crystal Reports: Load report failed error.

P: n/a
Hi

I try to open a CR report file located on the network path from a web form
developed with vs2003 and CR for Visual Studio, but the Load method of
ReportDocument object always return error.

---------------------
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.LoadSaveRep ortException: Load report
failed.

Source Error:

Line 32: oRpt.Load( "\\\\server\\dir\\report.rpt");

Source File: c:\inetpub\wwwroot\crtest\webform1.aspx.cs Line: 32

Stack Trace:

[LoadSaveReportException: Load report failed.]
.I(String , EngineExceptionErrorID )
.E(String , Int32 )
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Load(String
reportName, OpenReportMethod openMethod, Int16 parentJob)
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Load(String
reportName)
crtest.WebForm1.Page_Load(Object sender, EventArgs evt) in
c:\inetpub\wwwroot\crtest\webform1.aspx.cs:32
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
----------
I have tryed to use impersonating setting the web.config file but I still
have a problem.
If I copy locally the CR report file and try to open it the web application
work fine, I try also to open file using FileStream and work.

sample code:

// this work
FileStream fs = new FileStream( "\\\\server\\dir\\report.rpt",
FileMode.Open, FileAccess.Read );
fs.Close();

ReportDocument oRpt = new ReportDocument();

// this generate error
oRpt.Load( "\\\\server\\dir\\report.rpt");

// this work
oRpt.Load( "c:\\Temp\\report.rpt");

CrystalReportViewer1.ReportSource = oRpt;

Some suggestion ?

Thanks in advance

Simon.
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.