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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void btnsubmit_Click(object sender, EventArgs e)
        {
            string tinhtrang = cbbtinhtrang.SelectedItem.ToString();
            string chidoan   = cbbchidoan.SelectedValue.ToString();
            string khoahoc   = cbbkhoahoc.SelectedValue.ToString();

            Report.crpt_TinhTrang rpt = new Report.crpt_TinhTrang();
            conn.Open();
            SqlDataAdapter dap = new SqlDataAdapter("SELECT tbl_ChiDoan.MaChiDoan,TenChiDoan,tbl_KhoaHoc.MaKhoaHoc , ThoiGianDaoTao, MaSV, HoTenSV, CONVERT(varchar(50),NgaySinh,103) as NgaySinh , DiaChi, DienThoai, TinhTrang, MaDT, NgayVaoDoan from tbl_ChiDoan, tbl_KhoaHoc, tbl_SINHVIEN where tbl_SINHVIEN.MaChiDoan = '" + chidoan + "' and tbl_KhoaHoc.MaKhoaHoc = '" + khoahoc + "' and tbl_SINHVIEN.MaChiDoan = tbl_ChiDoan.MaChiDoan and tbl_KhoaHoc.MaKhoaHoc = tbl_ChiDoan.MaKhoaHoc and TinhTrang = N'" + tinhtrang + "' ", conn);
            DataSet        ds  = new DataSet();

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