尽管表格中有数据,报告仍无法正常工作 - 请更正代码 - ReportView [英] Report not working despite data in table - please correct the codes - ReportView
本文介绍了尽管表格中有数据,报告仍无法正常工作 - 请更正代码 - ReportView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的期待,
我已经生成了一张桌子上的记录。
我已经在表格上放了一份报告附上报告。
然而数据还没有出来。
请通过更正代码来协助下面
Dear expect ,
I have generated records which are in a table.
I have placed a reportview on a form with the report attached.
However the data is just not coming out.
Please assist by correcting the codes below
string str;
str = ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;
SqlConnection sqlCon = new SqlConnection(str);
sqlCon.Open();
SqlDataAdapter daa = new SqlDataAdapter("select * from SCHEDULE", sqlCon);
DataSet dsasa = new DataSet();
daa.Fill(dsasa, "SCHEDULE");
ReportViewer1.Visible = true;
ReportViewer1.Reset();
ReportViewer1.LocalReport.Refresh();
ReportViewer1.Reset();
推荐答案
Microsoft.Reporting.WebForms.ReportDataSource[] RSArray = new Microsoft.Reporting.WebForms.ReportDataSource[1];
ReportViewer1.Visible = true;
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsRatingReport", dsRatingReport.Tables(0)));
ReportViewer1.LocalReport.Refresh();
这篇关于尽管表格中有数据,报告仍无法正常工作 - 请更正代码 - ReportView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文