问题
How do we set the parameters of .Net's reportviewer?
回答1:
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.
来源:https://stackoverflow.com/questions/637464/set-reportviwers-parameter-in-an-application