DataSet1 a = new DataSet1();
DataRow dr = a.TABLE2.NewRow();
dr[0] = 1;
dr[1] = 2;
dr[2] = 3;
a.TABLE2.Rows.Add(dr);
Microsoft.Reporting.WebForms.ReportDataSource bb = new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_TABLE2", a.TABLE2);
ReportVIEwer1.LocalReport.DataSources.Clear();
ReportVIEwer1.LocalReport.DataSources.Add(bb);
dataset1是個xsd文件,因為設計報表 的時候一定要個數據源拖拉方便,就會生成個xsd文件