private void generate_credit_Load(object sender, EventArgs e) { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); DataSet7 ds = new DataSet7(); SqlCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = j; cmd.ExecuteNonQuery(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds.DataTable1); CrystalReport7 myreport = new CrystalReport7(); myreport.SetDataSource(ds); crystalReportViewer1.ReportSource = myreport; }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReport7 rpt = new CrystalReport7(); rpt.Site = this.Site; return(rpt); }