Set reportviwer's parameter in an application

吃可爱长大的小学妹 提交于 2019-12-07 14:19:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!