コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RpPhieuKho rpt = new RpPhieuKho();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        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();
        }