我在搜索有关Datatableas 的最后一个问题datasource时ReportViewer,发现这是解决方案
DataTable table = new DataTable();
table.Columns.Add("value", typeof(string));
table.Columns.Add("price", typeof(string));
table.Columns.Add("quantity", typeof(string));
table.Rows.Add("test1","10","20");
table.Rows.Add("test2", "10", "20");
reportViewer1.LocalReport.DataSources.Clear();
ReportDataSource rprtDTSource = new ReportDataSource("TITLE",table);
reportViewer1.LocalReport.DataSources.Add(rprtDTSource);
reportViewer1.RefreshReport();
Run Code Online (Sandbox Code Playgroud)
但是我得到这个图像
问题是什么 ??