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