Hello everybody,
I added a DataSet ReportsDataSet.xsd in my project and added one DataTable named dtClients with 9 columns. I added a crystal report and designed it using this data table. Now I want to fill the data table to show the results in crystal reports. Following is the code I am using to fill the data table.
But the data doesn't show up in the report. I need to know what I am doing wrong. Any idea?Code:ReportsDataSet ds = new ReportsDataSet(); DataRow dr; for (int i = 0; i < dtClients.Rows.Count; i++) { dr = ds.dtClients.NewRow(); dr["ClientNumber"] = dtClients.Rows[i]["ClientNumber"].ToString(); dr["From"] = dtClients.Rows[i]["From"].ToString(); dr["ClientName"] = dtClients.Rows[i]["ClientName"].ToString(); dr["Person"] = dtClients.Rows[i]["Person"].ToString(); dr["Address"] = dtClients.Rows[i]["Address"].ToString(); dr["Near"] = dtClients.Rows[i]["Near"].ToString(); dr["Phone"] = dtClients.Rows[i]["Phone"].ToString(); dr["Cell"] = dtClients.Rows[i]["Cell"].ToString(); dr["Email"] = dtClients.Rows[i]["Email"].ToString(); ds.dtClients.Rows.Add(dr); ds.dtClients.AcceptChanges(); }
Thanks.




Reply With Quote