从 .NET 代码将参数传递到 ActiveReports 报表的最简单方法
如何在 ActiveReports 报表中传递 SQL 查询所需的参数?我知道有关进入 ReportStart 事件的代码,但是如何通过报告的参数值?
How does one pass parameters needed by my SQL query in an ActiveReports report? I know about the code that goes into the ReportStart event, but how does one pass the values of the parameters to the report?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
想通了。从运行报告的类来看:
显然,当一个新的报告打开时,它会被解析为参数,并将它们添加到参数集合中。所以你只需要按照自己的意愿设置属性即可。
Figured it out. From your class running the report:
Apparently, when one new ups the report, it is parsed for parameters and they are added to the Parameters collection. So you would just need to set the properties as one wishes.
还有另一种方法可以做到这一点,请检查这里。
http://www .daniweb.com/software-development/csharp/threads/230041/active-reports-passing-variable-to-ar-class
There is another way of doing it, please check here.
http://www.daniweb.com/software-development/csharp/threads/230041/active-reports-passing-variable-to-ar-class