How To Pass Parameter to .rdlc Report
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SL G48 reputationPosted May 19, 2015, 1:35 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted May 16, 2015, 9:24 PM EDT
You can use ReportParameterCollection and ReportParameter. Please see this code :
ReportParameterCollection ReportParameterCollection = new ReportParameterCollection();
ReportParameterCollection.Add(new ReportParameter("param1", "paramvalue"));
ReportParameterCollection.Add(new ReportParameter("param2", "paramvalue"));
this.ReportViewer1.LocalReport.SetParameters(ReportParameterCollection);
Fore more details check these links :
ReportParameterCollection Class
https://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportparametercollection%28v=vs.100%29.aspx
ReportParameter Class
https://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.reportparameter%28v=vs.90%29.aspx