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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void btnxuatthang_Click(object sender, EventArgs e)
        {
            string Thang = txtThang.Value.Date.ToString("MM");
            string Nam   = txtThang.Value.Date.ToString("yyyy");
            string sql   = "SELECT HOADON.MAKH,SOHD,HOTEN,BIENSO,NGHD,TONGGIA FROM KHACHHANG,HOADON WHERE KHACHHANG.MAKH = HOADON.MAKH AND NGHD IS NOT NULL "
                           + " AND YEAR(NGHD) = '" + Nam + "' AND MONTH(NGHD) ='" + Thang + "'";

            DataTable dt = new DataTable();
            RpThang   BC = new RpThang();

            dt = sp_BUS.Display(sql);

            BC.SetDataSource(dt);
            crystalReportViewer1.ReportSource = BC;
            crystalReportViewer1.Refresh();
        }