动态设置 RDLC 报告中文本框的大小

发布于 2024-08-26 15:34:12 字数 63 浏览 3 评论 0原文

可以使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一曲琵琶半遮面シ 2024-09-02 15:34:12

不容易。
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.

送舟行 2024-09-02 15:34:12

对此没有解决办法。肮脏的方法是加载 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文