好友
阅读权限10
听众
最后登录1970-1-1
|
没事吹吹牛
发表于 2019-11-6 15:34
//设置本地报表,使程序与之前所建的testReport.rdlc报表文件进行绑定.
string P_Path = AppDomain.CurrentDomain.BaseDirectory + "Report1.rdlc";
reportViewer1.LocalReport.ReportPath = P_Path;
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", dataSet.Tables[0]));
reportViewer1.ProcessingMode = ProcessingMode.Local;
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("ReportParameter2", dateTimePicker1.Text));
//paramList.Add(new ReportParameter("ReportParameter2", textBox1.Text, false));
///----------------------------------------运行到这就报错,如果注释了就正常显示,但是参数没有传-----------------------------------------
//this.reportViewer1.ServerReport.SetParameters(paramList);
reportViewer1.RefreshReport(); |
-
代码
-
报错信息
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|