Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpDiemSinhVien rpt = new rpDiemSinhVien();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void btIn_Click(object sender, EventArgs e)
        {
            rpDiemSinhVien re = new rpDiemSinhVien();

            try
            {
                string         sql  = "exec SP_RPBANDIEM '" + luuChonLop + "','" + luuChonMH + "'," + lanThi + "";
                SqlCommand     com1 = new SqlCommand(sql, Program.conn);
                SqlDataAdapter da1  = new SqlDataAdapter(com1);
                DataTable      dt1  = new DataTable();
                da1.Fill(dt1);
                re.SetDataSource(dt1);
                crystalReportViewer1.ReportSource = re;
            }
            catch (Exception ex)
            {
            }
        }