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

Crystal report load only works with explicit path

P: n/a
Following the help documentation, I can only get the report.Load method to
work if I type in the full path. By toggling the commented line below, it
proves that the report will open only when the path is provided. When the
path is not provided, I get report cannot be found error - as listed at
bottom of this post. I have tried all combinations of "@", "./", ".\", etc.
Any help is greatly appreciated.

myReport = new ReportDocument();
//myReport.Load(@"C:\Documents and Settings\jgunderson\My
Documents\Visual Studio 2005\WebSites\WebSite17\CrystalReport.rpt");
this.CrystalReportViewer1.ReportSource = myReport;

System.Exception was unhandled by user code
Message="Load report failed."
CrystalDecisions.ReportAppServer.ReportClientDocum entWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Load(String
filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Load(String
at Default3.ConfigureCrystalReports() in c:\Documents and
Settings\jgunderson\My Documents\Visual Studio
2005\WebSites\WebSite17\Default3.aspx.cs:line 28
at Default3.Page_Init(Object sender, EventArgs e) in c:\Documents and
Settings\jgunderson\My Documents\Visual Studio
2005\WebSites\WebSite17\Default3.aspx.cs:line 36
at System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp,
Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object
sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Dec 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.