Click here to Skip to main content
15,915,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Comments
thatraja 2-Dec-13 5:19am    
Show the data schema of your report(screenshot)

1 solution

 
Share this answer
 
Comments
Abhijeet pratap singh 30-Nov-13 2:23am    
nops pls read first my question
thanx fr revert

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900