public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rpBill rpt = new rpBill(); rpt.Site = this.Site; return(rpt); }
private void reportBill_Load(object sender, EventArgs e) { //tạo đối tượng và đưa dữ liệu và dataBill DataBillTableAdapters.BILLTableAdapter bill = new DataBillTableAdapters.BILLTableAdapter(); DataBillTableAdapters.BILLDETAILTableAdapter billDetail = new DataBillTableAdapters.BILLDETAILTableAdapter(); DataBillTableAdapters.DISHTableAdapter dish = new DataBillTableAdapters.DISHTableAdapter(); DataBillTableAdapters.CUSTOMERTableAdapter cus = new DataBillTableAdapters.CUSTOMERTableAdapter(); DataBillTableAdapters.EMPLOYEETableAdapter emp = new DataBillTableAdapters.EMPLOYEETableAdapter(); DataBill data = new DataBill(); dish.Fill(data.DISH); bill.Fill(data.BILL, int.Parse(this.billID)); billDetail.Fill(data.BILLDETAIL, int.Parse(this.billID)); cus.Fill(data.CUSTOMER, int.Parse(this.cusID)); emp.Fill(data.EMPLOYEE, int.Parse(this.empID)); rpBill r = new rpBill(); //đưa dữ liệu từ databill và CystalReport r.SetDataSource(data); this.reportBill.ReportSource = r; }