public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crp_in_phieunhan rpt = new crp_in_phieunhan(); rpt.Site = this.Site; return(rpt); }
public frm_in_phieunhan() { InitializeComponent(); crp_in_phieunhan sv = new crp_in_phieunhan(); String sql = "Select khachhang.tenkh, maphieu, serisp, tensp, nhanvien.tennv,yeucaukh, ngaynhanhs, ngayhentra, ghichu From phieunhan join nhanvien On phieunhan.manv=nhanvien.manv join khachhang on phieunhan.makh=khachhang.makh where maphieu=(select max (maphieu) from phieunhan)"; if (lib.reDataSet(sql).Tables[0].Rows.Count == 0) { MessageBox.Show("No data", "Reporting", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } sv.SetDataSource(lib.reDataSet(sql).Tables[0]); crystalReportViewer1.ReportSource = sv; }