private void ReportFromDBTable() { CRCategory report = new CRCategory(); report.DataSourceConnections.Clear(); report.Database.Tables["Category"].SetDataSource(GetCategoryTable()); CRV.ReportSource = report; }
public void ReportFromStaticData() { DataTable dt = new DataTable(); dt.Columns.Add("id", typeof(int)); dt.Columns.Add("name", typeof(string)); dt.Rows.Add(2, "category 1"); CRCategory report = new CRCategory(); report.Database.Tables["Category"].SetDataSource(dt); CRV.ReportSource = null; CRV.ReportSource = report; }