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

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        public void BaoCaoChiTieuTrongNgay()
        {
            cmd.CommandText = "select pnh.MAPNH, nv.TENNV, ncc.TENNCC, Sum(ct.SL*ct.GIA) as TONGTIEN"
                              + " from PHIEU_NHAP_HANG pnh, CHI_TIET_PHIEU_NHAP_HANG ct, NHAN_VIEN nv, NHA_CUNG_CAP ncc"
                              + " where pnh.MAPNH=ct.MAPNH and pnh.MANVLAP=nv.MANV and pnh.MANCC=ncc.MANCC and pnh.NGAYLAP=CONVERT(varchar, getdate(), 23)"
                              + " group by pnh.MAPNH, nv.TENNV, ncc.TENNCC";
            da.SelectCommand = cmd;

            DataTable dt = new DataTable("ChiTieuTrongNgay");

            da.Fill(dt);

            crptChiTieuTrongNgay rp = new crptChiTieuTrongNgay();

            rp.SetDataSource(dt);
            crystalReportViewer1.ReportSource = rp;
        }