SSRS tablix 列 CanGrow 宽度属性?
我正在 SSRS 2008 中开发 tablix,并希望我的列能够根据其内容自动调整大小(仅宽度)。 CanGrow 仅影响身高。是否有我缺少的属性或任何其他方式来操纵列来执行此操作?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我正在 SSRS 2008 中开发 tablix,并希望我的列能够根据其内容自动调整大小(仅宽度)。 CanGrow 仅影响身高。是否有我缺少的属性或任何其他方式来操纵列来执行此操作?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
我一直在尝试自己(客户端)这样做,但没有成功。没有可以自动调整列宽的属性。
查看此解决方法:http://blog.sharepointalist.com/2009/05 /ssrs-column-width-auto-size.html (我还没有测试过)
我发现的客户端报告的最佳解决方法是在代码中设置列的宽度或使用多个列和根据字符串长度条件显示/隐藏它们。
例如,名为 AccNum2 的列:
有关详细信息和其他想法,请参阅此线程:
<一href="http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/9e6043f1-c458-4540-be59-d37b02feab8a/ ">http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/9e6043f1-c458-4540-be59-d37b02feab8a/
I've been trying to do that myself (client side), without success. There is no property that would autosize the column width.
Check out this workaround: http://blog.sharepointalist.com/2009/05/ssrs-column-width-auto-size.html (I haven't tested it)
The best workaround I've found for client side reporting would be to set column's width in code or use multiple columns and show/hide them based on string length condition.
For example, column named AccNum2:
See this thread for details and other ideas:
http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/9e6043f1-c458-4540-be59-d37b02feab8a/
如前所述此处,解决此问题的一个简单方法是在 Tablix 中添加一行并插入图表到相应的列。
然后将其
DynamicWidth
更改为如下表达式=iif(True, "4cm", "2cm")
并将其DynamicHeight
更改为 “0厘米”。As mentioned here, an easy fix to this issue is to add a row in your tablix and insert a chart to the corresponding column.
Then change its
DynamicWidth
to an expression like the following=iif(True, "4cm", "2cm")
and itsDynamicHeight
to "0cm".SHOWKATH VALLI 的解决方案最适合我。
绝对天才的想法!
我是这样实现的:
单击新列的列可见性。 p>
根据计算隐藏/显示,或者在我的情况下,根据选择语句中的值隐藏/显示这是一个宽列。
这是我创建的表达式:
=IIF(Fields!Static1Wide.Value=0,True,False)
The solution from SHOWKATH VALLI worked best for me.
An absolute genius idea!
This is how I implemented it:
Click on the column visibility of your new column.
Hide/show based upon a calculation or in my case a value in my select statement that this is a wide column.
Here is the expression I created:
=IIF(Fields!Static1Wide.Value=0,True,False)
我们可以动态更改宽度。按照以下步骤
步骤1:再添加一列
步骤2:将添加的列与原始列合并
步骤3:根据您的要求添加额外列的列可见性表达式,
但您仍然没有得到然后查看附图
we can change width dynamically .follow the below steps
step1:add one more column
step2:merge the added columns with original one
step3:add column visibility expression for extra column based on your requirement
still your not getting then see attached picture
我通过使用“EMAIL”字段的表达式来解决这个问题,其中包含电子邮件地址:
如果在 15 个字符后需要它,您可以执行类似的操作(每 15 个字符后插入 System.Environment.NewLine 代码) ) 或许。
I got around this with a table that had email addresses in it by using an expression for the 'EMAIL' field:
You could do something similar if you needed it after say 15 chars (insert the System.Environment.NewLine code after every 15 chars) maybe.
这可能不是您正在寻找的答案,但是必须一次调整 100 多个列的宽度并不有趣,而且这个小技巧确实可以节省时间。
尝试一下这个方法。如果您发现任何更好或改进...请告诉我!
This may not be the answer you're looking for, but having to adjust width for over 100s of columns at once is just not fun and this little hack does save time.
Give this method a try. If you find anything better or improvements..do let me know!
更改列宽
在“设计”视图中,单击 Tablix 数据区域中的任意位置将其选中。灰色列控柄出现在 Tablix 数据区域的外边框上。
将鼠标悬停在要扩展的列手柄边缘上。出现一个双头箭头。
单击以抓住列的边缘并向左或向右移动以调整列宽。
检查下面的图片:(由于分数低,我无法在这里发布图片)
https://i.sstatic.net/FvCQF.jpg
参考:http://technet.microsoft.com/en-us/library/cc645971(v=sql.100).aspx
To change column width
In Design view, click anywhere in the Tablix data region to select it. Gray column handles appear on the outside border of the Tablix data region.
Hover over the column handle edge that you want to expand. A double-headed arrow appears.
Click to grab the edge of the column and move it left or right to adjust the column width.
Check the image below: (im unable to post images here due to low points)
https://i.sstatic.net/FvCQF.jpg
Reference: http://technet.microsoft.com/en-us/library/cc645971(v=sql.100).aspx