Esempio n. 1
0
   private void loadreport()
 {
 {              
         cn.Open();
         SqlDataAdapter da = new SqlDataAdapter("select *  from [MyTable1] where (Number LIKE '" + DropDownList1.Text + "') ", cn);
        da.Fill(ds);
        cn.Close();
 {
 {
        cn1.Open();
        SqlDataAdapter da1 = new SqlDataAdapter("select *  from [MyTable2] where (No LIKE '" + DropDownList1.Text + "') ", cn1);
             //DataTable ds1 = new DataTable();
         da1.Fill(ds1);
      cn1.Close();
 }
     rdoc.Database.Tables[0].SetDataSource(ds);
     rdoc.Database.Tables[1].SetDataSource(ds1);
    
     InvoiceReport.ReportSource = rdoc;
     InvoiceReport.DataBind();
 }