public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReport_BangDiem rpt = new CrystalReport_BangDiem(); rpt.Site = this.Site; return(rpt); }
private void Form_RpDiem_Load(object sender, EventArgs e) { cnn = new SqlConnection(constr); SqlCommand cmd = new SqlCommand("Select * from view_tbcanamnew", cnn) { CommandType = CommandType.Text }; cnn.Open(); CrystalReport_BangDiem rp = new CrystalReport_BangDiem(); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { DataTable dt = new DataTable(); da.Fill(dt); rp.SetDataSource(dt); } crystalReportViewer_BDiem.ReportSource = rp; cmd.Dispose(); cnn.Close(); }