3
Answers

Crystal Repott Error

jeevan mummadi

jeevan mummadi

12y
8.7k
1

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

 

Answers (3)