con.Open();
objRpt = new CrystalReport2();
string query = "select sr_no as sr_no, gross_wt as gross_wt,core_wt as core_wt,nett_wt as nett_wt from printing_list where c_id='"+Settings.Default.companId+"' and batch_code='"+comboBox2.Text+"' and category='"+comboBox1.Text+"'";
string query1 = "select c_name as c_name from dbo.company_info where c_id='" + Settings.Default.companId + "' ";
string query2 = "select batch_code as batch_code,party_code as party_code,size as size, thickness as thicknes,color as color,mfg_by as mfg_by from dbo.batch_enty where c_id='" + Settings.Default.companId + "' ";
try
{
SqlDataAdapter adepter = new SqlDataAdapter(query, con);
SqlDataAdapter adepter1 = new SqlDataAdapter(query1, con);
SqlDataAdapter adepter2 = new SqlDataAdapter(query2, con);
DataSet1 Ds = new DataSet1();
adepter.Fill(Ds, "DataTable1");
adepter1.Fill(Ds,"DataTable2");
adepter2.Fill(Ds, "DataTable3");
objRpt.SetDataSource(Ds);
crystalReportViewer1.ReportSource = objRpt;
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
con.Close();
in this code when i comment the adepter2.Fill(Ds, "DataTable3");
then everythin fine but batch_enty data not shown
but when i remove as comment adepter2.Fill(Ds, "DataTable3"); this
then entry in crystal report showing double which is extracted form datatable2