public DataTable report() { DataTable d = new DataTable(); d.Columns.Add("CH_Name", typeof(string)); d.Columns.Add("CH_Amount", typeof(decimal)); d.Columns.Add("CH_InsertDate", typeof(DateTime)); d.Columns.Add("CH_InsertBY", typeof(string)); DataTable dd = r.CASHHAND(); for (int i = 0; i < dd.Rows.Count; i++) { DataRow row = d.NewRow(); row["CH_Name"] = dd.Rows[i]["CH_Name"]; row["CH_Amount"] = dd.Rows[i]["CH_Amount"]; row["CH_InsertDate"] = dd.Rows[i]["CH_InsertDate"]; row["CH_InsertBY"] = dd.Rows[i]["CH_InsertBY"]; d.Rows.Add(row); } return(d); }