I created one simple Crystal Report
DataSet ds = new DataSet();
BL obj = new BL();
ds = obj.get_student();
DataTable dt = new DataTable();
if (ds != null)
if (ds.Tables.Count > 0)
if (ds.Tables[0].Rows.Count > 0)
{
try
{
CrystalDecisions.CrystalReports.Engine.
ReportDocument obj1 = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
obj1.Load(
"F:\\Jeevan_Data\\AssetReports\\AssetReports\\CrystalReport1.rpt");
dt = ds.Tables[0];
obj1.SetDataSource(dt);
crystalReportViewer1.ReportSource = obj1;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
But i getting this error: The report has no tables.
But Dataset having 5rows ,tell me the how to bind data to crystal report