public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CRp_DsDonHang rpt = new CRp_DsDonHang(); rpt.Site = this.Site; return(rpt); }
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(); }