I have few reports template which use Oracle view as datasource. All the template use ODBC to connect to Oracle database. Some of them works fine, but some unfortunately give me a lot of pain in figuring out the way to solve them. when i try to run the report,
CrystalReportViewer prompted by display the following error message:
"The table 'VW_IVY_SCRAPTOTALSFORSO_REPORT' could not be found. Error in File C:\DOCUME~1\SOSOON~1\LOCALS~1\Temp\RejectMorePerSO_i {D304CC97-802C-40F8-B282-F669682A3DBA}.rpt: The table could not be found."
When i try to run these reports in Crystal Report Designer 2011, it can actually populate data without error. When i run in VS 2008, it also prompted the same error message but still populating the data after i clicked "OK" on the prompt. Too bad, when
i run in ASP.NET web appp, it simply can't work. I have verify many time that the view actually exist in the database and i have access to the right schema.
After few days, i managed to overcome this prolblem by changing connection type of that report from ODBC to OLE DB in Crystal Report designer. I don't know what is the problem. Its simply works.
Looks like ODBC has some configuration setting that can't find the Views which actually is in the DB and corresponding schema.
Marked as answer by SoonYuan on Feb 06, 2013 08:01 AM
SoonYuan
Member
4 Points
13 Posts
Crystal Report template failed to open an Oracle view to populate report.
Jan 31, 2013 06:40 AM|LINK
Hi guys,
i have a weird issue with some crystal report templates created with Crystal Report 2011 which been called by asp.net 3.5 (VS 2008) coding as below:
if (Session["rd"] == null) { rd = new ReportDocument(); rpt = Request.QueryString["rpt"]; switch (rpt) { case "NR01": rd.Load(Server.MapPath("~/Reports/" + "RejectMore_ivy_2011.rpt")); rd.SetDatabaseLogon(Userid, Password); rd.SetParameterValue("ScrapGrp", Request.QueryString["cat"]); rd.SetParameterValue("Limit", Request.QueryString["qty"]); rd.SetParameterValue("Package", Request.QueryString["package"]); rd.SetParameterValue("StartDate", Request.QueryString["startdate"]); rd.SetParameterValue("EndDate", Request.QueryString["enddate"]); Session["rd"] = rd; break; case "NR02": rd.Load(Server.MapPath("~/Reports/" + "RejectMorePerSO_i.rpt")); //rd.Load(Server.MapPath("~/Reports/" + "PMTest1.rpt")); rd.SetDatabaseLogon(Userid, Password); rd.SetParameterValue("Shoporder", Request.QueryString["so"]); rd.SetParameterValue("Scrap Category", Request.QueryString["cat"]); Session["rd"] = rd; break; case "NR03": rd.Load(Server.MapPath("~/Reports/" + "LowYieldStore.rpt")); rd.SetDatabaseLogon(Userid, Password); rd.SetParameterValue("Package", Request.QueryString["package"]); Session["rd"] = rd; break; default: break; } } else { rd = (ReportDocument)Session["rd"]; } CrystalReportViewer.ReportSource = rd; }I have few reports template which use Oracle view as datasource. All the template use ODBC to connect to Oracle database. Some of them works fine, but some unfortunately give me a lot of pain in figuring out the way to solve them. when i try to run the report, CrystalReportViewer prompted by display the following error message:
"The table 'VW_IVY_SCRAPTOTALSFORSO_REPORT' could not be found. Error in File C:\DOCUME~1\SOSOON~1\LOCALS~1\Temp\RejectMorePerSO_i {D304CC97-802C-40F8-B282-F669682A3DBA}.rpt: The table could not be found."
When i try to run these reports in Crystal Report Designer 2011, it can actually populate data without error. When i run in VS 2008, it also prompted the same error message but still populating the data after i clicked "OK" on the prompt. Too bad, when i run in ASP.NET web appp, it simply can't work. I have verify many time that the view actually exist in the database and i have access to the right schema.
Please help...i am lost...
SoonYuan
Member
4 Points
13 Posts
Re: Crystal Report template failed to open an Oracle view to populate report.
Feb 06, 2013 08:00 AM|LINK
Hi all,
After few days, i managed to overcome this prolblem by changing connection type of that report from ODBC to OLE DB in Crystal Report designer. I don't know what is the problem. Its simply works.
Looks like ODBC has some configuration setting that can't find the Views which actually is in the DB and corresponding schema.