动态设置 RDLC 报告中文本框的大小
可以使用 C# 动态设置本地 RDLC 报告中文本框的宽度吗?我想根据文本框包含的数据自动调整文本框的水平宽度。
Can a textbox's width in a local RDLC report be set dynamically using C#? I would like to auto size the horizontal width of the text box based on the data it contains.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不容易。
http://gotreportviewer.com/ 提供了如何从 C# 动态生成 RDLC 的示例。或者,您可以尝试将脚本添加到报告中来执行此操作。不过,我不确定大小和坐标实际上是可写属性。我怀疑它们是只读的。
Not easily.
http://gotreportviewer.com/ has examples for how to generate the RDLC dynamically from C#. Alternatively, you can try to add a script to your report that does that. I am not sure that the size and coordinates are in fact writable properties, though. I suspect that they are read-only.
对此没有解决办法。肮脏的方法是加载 rdlc xml 文件并在加载报告之前对其进行编辑:确实非常肮脏。
There's no solution for this. The dirty way is loading the rdlc xml file and edit it before loading the report: very dirty indeed.