Dear friend's
i create an application with c# contain 2 form's
the first is a formulare with a datagridview ( i upload the values manual with a textbox)
in the second form i have a crystal report
now all what i need is to passing the datagridview values to the crystal report in the secand form
i make all the textbox's showing in the crystal i just need to display the values of datagridview to my report.

Sanwar RanwaRank #23 · 44.7K reputationPosted Sep 12, 2018, 3:53 AM EDT
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);
}
}
DataTable dt = (DataTable)dataGridView1.DataSource;
and Pass it dataTable Into Rteport Source
MOHSEN BENAISSA23 reputationPosted Sep 12, 2018, 4:07 AM EDT