How do we set the parameters of .Net's reportviewer?
+3
A:
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("ClientName", clientName, false));
TheReportObject.LocalReport.SetParameters(paramList);
And you have to make sure you define the same named parameters inside the report definition as well.
DancesWithBamboo
2009-03-12 05:25:20
Thanks a lot for the tip.!
2009-03-12 06:01:29
Note that sending false to the ReportParameter constructor will hide the parameter from the user. If you don't intend to hide the parameter, there's an overload that doesn't take that boolean (or send true).
Liron Yahdav
2009-05-20 04:45:16