public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { OrderCOF rpt = new OrderCOF(); rpt.Site = this.Site; return(rpt); }
private void OrViewbtn_Click(object sender, EventArgs e) { if (OrViewrbtn.Checked == true) { BalloonKingdomDataSetTableAdapters.OrderlineTableAdapter order2 = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.OrderlineTableAdapter(); DataTable datatable = order2.ViewOrderline(); Order_Masterlist rpt = new Order_Masterlist(); OrderName nameor = new OrderName(); nameor.SetDataSource(datatable); rpt.AssignOrName(nameor); rpt.Show(); } else if (COFNorbtn.Checked == true) { if ((OrCOFFrmtxt.Text != "" && OrCOFUptxt.Text == "") || (OrCOFFrmtxt.Text == "" && OrCOFUptxt.Text != "") || (OrCOFFrmtxt.Text == "" && OrCOFUptxt.Text == "")) { MessageBox.Show("Enter id first", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { int a = Convert.ToInt32(OrCOFFrmtxt.Text); int b = Convert.ToInt32(OrCOFUptxt.Text); BalloonKingdomDataSetTableAdapters.OrderlineTableAdapter orcof = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.OrderlineTableAdapter(); DataTable datatable = orcof.OrBeginEnd(a, b); Order_Masterlist rpt = new Order_Masterlist(); OrderCOF coford = new OrderCOF(); coford.SetDataSource(datatable); rpt.AssignOrCOF(coford); rpt.Show(); } } else { BalloonKingdomDataSetTableAdapters.OrderlineTableAdapter ordate = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.OrderlineTableAdapter(); DataTable datatable = ordate.OrDateBeginEnd(Convert.ToDateTime(OrderFrmpick.Value), Convert.ToDateTime(OrderUppick.Value)); Order_Masterlist rpt = new Order_Masterlist(); OrderDate dateor = new OrderDate(); dateor.SetDataSource(datatable); rpt.AssignOrDate(dateor); rpt.Show(); } }
public void AssignOrCOF(OrderCOF rpt) { crystalReportViewer1.ReportSource = rpt; }