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