The report has no tables - Error
Description: An unhandled exception occurred during the execution of the current web request.
Exception Details: CrystalDecisions.CrystalReports.Engine.DataSourceE xception: The report has no tables
I am getting this error for this code
public void load_data()
{
ReportDocument rptFineBill = new ReportDocument();
string path = Server.MapPath("~/Report/Student_Fee.rpt");
rptFineBill.Load(path);
string str = Session["roll"].ToString();
string query = "SELECT student_name, class, section, rollno, fee_type FROM dbo.tbl_fee_info where student_name='" + str + "'";
con.Open();
SqlDataAdapter da = new SqlDataAdapter(query,con);
DataSet ds = new DataSet();
da.Fill(ds);
ds.Tables[0].TableName = "Student_Fee";
rptFineBill.SetDataSource(ds); // Here I am getting
CrystalReportViewer1.ReportSource = rptFineBill;
CrystalReportViewer1.DataBind();
}
Kindly anyone resolve it soon....
Thanks
Emma
|