Hi friends can any one help me how to pass data from datagridview to crystal report
Thanks
Znaneswar
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gohil JayendrasinhPosted Jun 25, 2012, 2:33 AM
// Creating object of our report.
objRpt = new my_rpt();
DataTable dt = (DataTable)dataGridView1.DataSource;
if( dt != null)
{
if( dt.Rows.Count > 0)
{
DataSet Ds = new DataSet();
ds.Tables.Add(dt);
objRpt.SetDataSource(Ds);
}
}
Kunal VaishyaPosted Jun 23, 2012, 3:25 AM
DataTable dt = (DataTable)dataGridView1.DataSource;
and Pass it dataTable Into Rteport Source