469,612 Members | 1,650 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Crystal report load only works with explicit path

Jay
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");
myReport.Load("CrystalReport.rpt");
this.CrystalReportViewer1.ReportSource = myReport;

System.Exception was unhandled by user code
Message="Load report failed."
Source="CrystalDecisions.CrystalReports.Engine"
StackTrace:
at
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
filename)
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)

--
Thanks
Jay
Dec 15 '05 #1
0 1290

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Stephan | last post: by
reply views Thread by Danny J. Lesandrini | last post: by
reply views Thread by Dipendra | last post: by
reply views Thread by Danny J. Lesandrini | last post: by
3 posts views Thread by route_coder | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.