Mohamed Somalia

Mohamed Somalia

  • NA
  • 312
  • 3.2k

Crystal Report Problem

May 31 2017 2:28 PM
I'am Begginer  I just recently installed Visual Studio 2015 and It's Crystal Report, everything's working good   my Crystal report but I can't display anything. Can you pls check if there is something I'm missing with this code:
 
 
IN C#
Mycon obj = new Mycon();
obj.con.Open();
ReportDocument rpt = new ReportDocument();
rpt.Load(Server.MapPath("~/CrystalReport.rpt"));
SqlCommand cmd = new SqlCommand("Select * from Kidreg", obj.con);
SqlDataAdapter da = new SqlDataAdapter();
DataSet ds = new DataSet();
da.SelectCommand = cmd;
da.Fill(ds, "Kidreg");
rpt.SetDataSource(ds);
obj.con.Close();
CrystalReportViewer1.ReportSource = rpt;
CrystalReportViewer1.DataBind();
 

Attachment: Report.rar

Answers (1)