public static SampleDataSet CreateData() { SampleDataSet ds = new SampleDataSet(); DataTable table = ds.Tables["table"]; table.Rows.Add(new object[] { 0, DateTime.Today, "A", 103 }); table.Rows.Add(new object[] { 1, DateTime.Today, "B", 200 }); table.Rows.Add(new object[] { 2, DateTime.Today, "C", 446 }); table.Rows.Add(new object[] { 3, DateTime.Today.AddDays(1), "A", 788 }); table.Rows.Add(new object[] { 4, DateTime.Today.AddDays(1), "B", 787 }); table.Rows.Add(new object[] { 5, DateTime.Today.AddDays(1), "C", 452 }); table.Rows.Add(new object[] { 6, DateTime.Today.AddDays(2), "A", 152 }); table.Rows.Add(new object[] { 7, DateTime.Today.AddDays(2), "B", 565 }); table.Rows.Add(new object[] { 8, DateTime.Today.AddDays(2), "C", 612 }); return(ds); }
private void SampleDataReport_DataSourceDemanded(object sender, EventArgs e) { this.DataSource = SampleDataSet.CreateData(); }