Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportBangDiemMonHoc rpt = new ReportBangDiemMonHoc();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void btnXem_Click(object sender, EventArgs e)
        {
            ReportBangDiemMonHoc obj = new ReportBangDiemMonHoc();

            string lenh = "EXEC sp_INBANGDIEMMONHOC '" + cmbLop.SelectedValue.ToString().Trim() + "', '" +
                          cmbMonHoc.SelectedValue.ToString().Trim() + "', " + cmbLanThi.Text;

            DataTable dataTable = Program.ExecSqlDataTable(lenh);

            obj.SetDataSource(dataTable);
            obj.SetParameterValue("TENLOP", cmbLop.Text);
            obj.SetParameterValue("TENMONHOC", cmbMonHoc.Text);
            obj.SetParameterValue("HOCKY", cmbHocKy.Text);
            obj.SetParameterValue("LANTHI", cmbLanThi.Text);

            crvBangDiemMonHoc.ReportSource = obj;
        }