Esempio n. 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CRp_DsDonHang rpt = new CRp_DsDonHang();

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
        private void btn_XuatEx_Click(object sender, EventArgs e)
        {
            string query = "SELECT DonHang.MaDonHang,DonHang.NgayMua,DonHang.SoLuong,DonHang.TongTien,DonHang.MaLoHang,NhanVien.TenNV,KhachHang.TenKH " +
                           "FROM DonHang,KhachHang,NhanVien " +
                           "WHERE DonHang.MaKH = KhachHang.MaKH and NhanVien.MaNV = DonHang.MaNV";
            CRp_DsDonHang sp = new CRp_DsDonHang();

            sp.SetDataSource(Dataset.DaTa.report(query));
            RpForm_DonHang f = new RpForm_DonHang();

            f.crystalReportViewer1.ReportSource = sp;
            f.ShowDialog();
        }