OK. So I have downloaded CR2008 and updated my crystal report and change my references from 11.5 to 12.0. Now when I run on both development and 2008 server I am getting error on the
CrystalReportViewer1.ReportSource = myCrystalReport1 statement below.
I did not get this before (under 11.5). If I take the parameter (ie BatchGuid) and call the crystal report directly it works fine. No idea what has changed? Thank you.
Error is:
System.Exception: Invalid Report Source.
at CrystalDecisions.ReportSource.ReportSourceFactory.CreateReportSource(Object objToBind, Object objEnterpriseLogon, Boolean isDesignMode, Boolean needHTTPCache)
at CrystalDecisions.Web.ReportAgentBase.set_ReportSource(Object value)
at CrystalDecisions.Web.ReportAgent.set_ReportSource(Object value)
at CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSource(Object value)
at CrystalDecisions.Web.CrystalReportViewer.set_ReportSource(Object value)
at Default_aspx.ShowCrystalReport() in C:\Users\vgwprja\Documents\Visual Studio 2005\WebSites\ProjectDailyReport1\Show_Report.aspx.vb:line 153
I have included code snippet below.
BatchGuid = "{" + Session("BatchGuid") + "}"
myCrystalReport1.Close()
Dim myPath As String = (Server.MapPath("ProjectDailyReport.rpt"))
myCrystalReport1.Load(myPath)
myCrystalReport1.SetDatabaseLogon(System.Configuration.ConfigurationManager.AppSettings("CrystalReport_UserId"), System.Configuration.ConfigurationManager.AppSettings("CrystalReport_Password"))
myCrystalReport1.SetParameterValue("BatchGuidNo", BatchGuid)
CrystalReportViewer1.ReportSource = myCrystalReport1
myCrystalReport1.DataSourceConnections.Clear()