private void button2_Click(object sender, EventArgs e) { SqlConnection cnn = new SqlConnection(chuoiketnoi.chuoikn); string sql = "select * from tiendo,chitietkh,kehoach where tiendo.makh='" + lbmakh.Text + "'"; sql += " and tiendo.madut=chitietkh.madut "; sql += "and tiendo.makh=chitietkh.makh "; SqlDataAdapter da = new SqlDataAdapter(sql, cnn); DataSet ds = new DataSet(); da.Fill(ds, "tiendo"); Reportds rp = new Reportds(); rp.SetDataSource(ds); // rp.SetDatabaseLogon("sa", "sa"); crystalReportViewer1.ReportSource = rp; }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Reportds rpt = new Reportds(); rpt.Site = this.Site; return rpt; }