public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { salesReportDate rpt = new salesReportDate(); rpt.Site = this.Site; return(rpt); }
private void button2_Click(object sender, EventArgs e) { try { con.Open(); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand("execute salesDateBal @date", con); da.SelectCommand.Parameters.AddWithValue("@date", textBox3.Text); DataTable dt = new DataTable(); da.Fill(dt); salesReportDate myreport = new salesReportDate(); myreport.SetDataSource(dt); SaleReportView srv = new SaleReportView(); srv.crystalReportViewer1.ReportSource = myreport; srv.Show(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "errorr!", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { con.Close(); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { salesReportDate rpt = new salesReportDate(); rpt.Site = this.Site; return rpt; }