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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
 private void GUI_Report_Load(object sender, EventArgs e)
 {
     if (THk.Equals("Ngay"))
     {
         int ngay  = int.Parse(BD.Day + "");
         int thang = int.Parse(BD.Month.ToString());
         int nam   = int.Parse(BD.Year.ToString());
         List <SP_THONGKEDOANHTHU_NGAY_Result> tmp = db.SP_THONGKEDOANHTHU_NGAY(ngay, thang, nam).ToList();
         BindingSource bs = new BindingSource();
         bs.DataSource = tmp;
         RP_TKNgay rp = new RP_TKNgay();
         rp.SetDataSource(bs);
         crv.ReportSource = rp;
         crv.RefreshReport();
     }
     else if (THk.Equals("Thang"))
     {
         int thang = int.Parse(BD.Month.ToString());
         int nam   = int.Parse(BD.Year.ToString());
         List <SP_THONGKEDOANHTHU_THANG_Result> tmp = db.SP_THONGKEDOANHTHU_THANG(thang, nam).ToList();
         BindingSource bs = new BindingSource();
         bs.DataSource = tmp;
         RP_TKThang rp = new RP_TKThang();
         rp.SetDataSource(bs);
         crv.ReportSource = rp;
         crv.RefreshReport();
     }
     else if (THk.Equals("Nam"))
     {
         int nam = int.Parse(BD.Year.ToString());
         List <SP_THONGKEDOANHTHU_NAM_Result> tmp = db.SP_THONGKEDOANHTHU_NAM(nam).ToList();
         BindingSource bs = new BindingSource();
         bs.DataSource = tmp;
         RP_TKNam rp = new RP_TKNam();
         rp.SetDataSource(bs);
         crv.ReportSource = rp;
         crv.RefreshReport();
     }
     else if (THk.Equals("TG"))
     {
         List <SP_THONGKEDOANHTHU_TG_Result> tmp = db.SP_THONGKEDOANHTHU_TG(BD, KT).ToList();
         BindingSource bs = new BindingSource();
         bs.DataSource = tmp;
         RP_TKTG rp = new RP_TKTG();
         rp.SetDataSource(bs);
         crv.ReportSource = rp;
         crv.RefreshReport();
     }
 }