Asp.net 水晶报告错误。报告没有表格
我正在使用空白的crystal report并绑定我的数据集。它显示报告没有表错误Asp.net 水晶报告错误。报告没有表格,asp.net,c#-4.0,crystal-reports,Asp.net,C# 4.0,Crystal Reports,我正在使用空白的crystal report并绑定我的数据集。它显示报告没有表错误 string strSQL = "Select * from EMP"; //WHERE EMPNO='" + txtEmpId.Text + "' OracleDataAdapter dt = new OracleDataAdapter(strSQL, scon); DataSet ds = new DataSet(); dt.Fill(ds, "EMP"); ReportDocument cryR
string strSQL = "Select * from EMP"; //WHERE EMPNO='" + txtEmpId.Text + "'
OracleDataAdapter dt = new OracleDataAdapter(strSQL, scon);
DataSet ds = new DataSet();
dt.Fill(ds, "EMP");
ReportDocument cryRpt = new ReportDocument();
cryRpt.FileName = Server.MapPath("~/Reports/DailyReport.rpt");
cryRpt.SetDataSource(dt);
CrystalReportViewer1.ReportSource = cryRpt;
scon.Close();
尝试使用以下代码
string strSQL = "Select * from EMP"; //WHERE EMPNO='" + txtEmpId.Text + "'
OracleDataAdapter da = new OracleDataAdapter(strSQL, scon);
DataSet ds = new DataSet();
DataTable dt = new DataTable("DT_CR");
da.Fill(dt);
ds.Tables[0].Merge(dt);
ReportDocument cryRpt = new ReportDocument();
cryRpt.FileName = Server.MapPath("~/Reports/DailyReport.rpt");
cryRpt.SetDataSource(ds);
CrystalReportViewer1.ReportSource = cryRpt;
scon.Close();
确切的错误是什么?是否确定表名正确?它显示错误:找不到表0。行ds.Tables[0].Mergedt;