I hope you are familiar with adding data to your report from a
DataSet
. So what you have to do is bind your
datagridview
data to your DataSet like this
DataTable dt = new DataTable();
dt.Columns.Add("Column1", typeof(string));
dt.Columns.Add("Column2", typeof(string));
dt.Columns.Add("Column3", typeof(double));
DataSetReport ds = new DataSetReport();
foreach (DataGridViewRow dgv in datagridview1.Rows)
{
dt.Rows.Add(dgv.Cells["Col1"].Value.ToString(), dgv.Cells["Col2"].Value.ToString(), double.Parse(dgv.Cells["Col3"].Value.ToString()));
}
ds.Tables[0].Merge(dt);