Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crpt_BaoCao_ChiDoan rpt = new crpt_BaoCao_ChiDoan();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            string chidoan = cbbChiDoan.SelectedValue.ToString();

            Report.crpt_BaoCao_ChiDoan rpt = new Report.crpt_BaoCao_ChiDoan();
            conn.Open();
            SqlDataAdapter dap = new SqlDataAdapter("SELECT HoTenSV,NgaySinh,TinhTrang,DienThoai,TenChiDoan from tbl_SINHVIEN, tbl_ChiDoan where tbl_SINHVIEN.MaChiDoan = tbl_ChiDoan.MaChiDoan and tbl_ChiDoan.MaChiDoan = " + chidoan + " group by tbl_ChiDoan.MaChiDoan, HoTenSV, NgaySinh, TinhTrang, DienThoai, TenChiDoan ", conn);
            DataSet        ds  = new DataSet();

            dap.Fill(ds);
            rpt.SetDataSource(ds.Tables[0]);
            crpt_BaoCao_ChiDoan.ReportSource = rpt;
            crpt_BaoCao_ChiDoan.Refresh();
            conn.Close();
        }