I was searching in the last question about Datatable
as datasource
in ReportViewer
and i found this as solution
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();
but i get this image as result
what is the problem ??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…