public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { RpPhieuKho rpt = new RpPhieuKho(); rpt.Site = this.Site; return(rpt); }
private void PhieuNhapKho_Load(object sender, EventArgs e) { string SQL = "SELECT NHAPKHO.MASP,TENSP,SLNHAP, DONVI,NHAPKHO.GIANHAP,NGAYNHAP,HOTEN,NHAPKHO.NGNHAP " + " FROM SANPHAM,NHAPKHO,NHANVIEN " + " WHERE NHAPKHO.NGAYNHAP >= '" + _Ngay1 + "' AND NHAPKHO.NGAYNHAP <= '" + _Ngay2 + "' " + "AND NHAPKHO.NGNHAP = NHANVIEN.MANV AND SANPHAM.MASP = NHAPKHO.MASP"; DataTable dt = new DataTable(); RpPhieuKho NhapKho = new RpPhieuKho(); dt = nk_BUS.Display(SQL); NhapKho.SetDataSource(dt); crystalReportViewer1.ReportSource = NhapKho; crystalReportViewer1.Refresh(); }