예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptSinhVienThuocPhong rpt = new rptSinhVienThuocPhong();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        public void ThongKe_ThuocPhong(string ten)
        {
            DataService           ser = new  DataService();
            SqlCommand            com = new SqlCommand("SELECT S.MAKTX,S.HOTEN,P.MAPHG,P.TENPHG,D.MADAY,D.TENDAY,K.KTX,K.TENKTX FROM SINHVIEN S, PHONG P, [DAY] D, KTX K, DSSINHVIEN_PHONG DS WHERE S.MAKTX=DS.MAKTX AND P.MAPHG=DS.MAPHG AND P.MADAY=D.MADAY AND D.KTX=K.KTX and P.TENPHG=N'" + ten + "'");
            rptSinhVienThuocPhong rpt = new rptSinhVienThuocPhong();

            ser.Load(com);
            rpt.SetDataSource(new DataTable());
            rpt.SetDataSource((DataTable)ser);
            this.crystalReportViewer1.ReportSource = rpt;
        }