提前感谢.... !! 解决方案 正如此处提到的那样 [ ^ ],对于RDLC: ReportViewer1.LocalReport.ReportPath = 〜/ Report1.rdlc; ReportParameter [] Parameters = new ReportParameter [ 1 ]; 参数[ 0 ] = new ReportParameter( LastName,Convert.ToString(LastNameDropDownList.SelectedValue)); ReportViewer1.LocalReport.SetParameters(Parameters); Hello to all.I have a form with a textbox and a button that opens a form containing an RDLC report. Is there a way to pass the value entered in the text box to the RDLC report in order to use it calculations?Thanks a lot for any kind help.Form Load codethis.reportViewer1.LocalReport.ReportEmbeddedResource = "TestReport.Report1.rdlc"; ReportParameter rp = new ReportParameter("content", this.textBox1.Text); this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp }); this.reportViewer1.RefreshReport();---------------------------------------------------------------VS2010 saysThe type or namespace name ''ReportParameter'' could not be found (are you missing a using directive or an assembly reference?)---------------------------------------------------------------Please Help.....thanks in advance....!! 解决方案 As mentioned here[^], for RDLC:ReportViewer1.LocalReport.ReportPath ="~/Report1.rdlc";ReportParameter[] Parameters = new ReportParameter[1];Parameters[0] = new ReportParameter("LastName", Convert.ToString(LastNameDropDownList.SelectedValue));ReportViewer1.LocalReport.SetParameters(Parameters); 这篇关于将参数传递给RDLC报告时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-21 06:41