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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void frm_ThongKe_Load(object sender, EventArgs e)
        {
            rptMUONSACH rpt   = new rptMUONSACH();
            DataSet     ds    = new DataSet();
            string      query = "Select b.MaThe, b.TenBanDoc, s.MaSach, s.TuaDe, s.TacGia, NgayMuon, NgayTra "
                                + " from (SACH s inner join MUONSACH m on s.MaSach = m.MaSach) "
                                + " inner join BANDOC b on m.MaThe = b.MaThe "
                                + " where NgayTra is Null";
            SqlDataAdapter da = new SqlDataAdapter(query, XL_BANG.Chuoi_lien_ket);

            da.Fill(ds);
            rpt.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = rpt;
        }