设置 Reporting ServicesReporting Services 图表中嵌套类别组标签的格式
我的 SSRS 图表中有 2 个类别组。一个是“短工作日名称”,另一个是“小时”。我希望图表显示每小时的变化,但我只想在水平轴上显示“短工作日名称”。
我希望它只显示“短工作日名称”,但“小时”仍然需要位于类别组中,我只想隐藏它。这可能吗?
提前谢谢!
I have 2 category groups in my SSRS chart. One is "short weekday name", the other is "hours". I want the graph to show hour-by-hour change, but I want only the "short weekday name" to be shown in the horizontal axis.
I want it to show JUST the "short weekday name", but "hours" still needs to be in the category group, I only want to hide it. Is this possible?
In advance, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,你可以想办法解决这个问题。打开“小时”组的类别组属性,然后转到“常规”选项卡。在“标签”字段中,单击“表达式”并输入:
这应该可以防止字段值在 x 轴上显示为标签。如果您想进一步整理,可以进入 x 轴属性并禁用主要和次要刻度线。您将留下图表上带有括号的外部类别组,但这是一个小问题。
这对我在 SSRS 2008 R2 上有用。
Yep, you can kind of hack your way around this. Open the Category Group properties for your "hours" group and go to the "General" tab. In the "Label" field, click "Expression" and enter:
This should prevent the field values from appearing as labels on the x-axis. If you want to tidy up further, you can go into the x-axis properties and disable major and minor tick marks. You'll be left with your outer Category group having brackets on the chart, but it's a minor gripe.
This worked for me on SSRS 2008 R2.
作为 GShenanigan 答案的增强,如果您将短工作日名称组设置为 =nothing,那么类别括号将消失。
如果您随后将时间组的标签设置为 = 短工作日名称,它应该看起来与您想要的完全一样。
As an enhancement to GShenanigan answer if instead you set the short weekday name group to =nothing then the category brackets will disappear.
If you then set the label of the hours group to = short weekday name, it should look exactly as you want it.
我知道这个问题已经回答了很长时间,但我想详细说明一下...您还可以强制使用标签自动调整设置(防止字体增大/缩小/偏移/换行为 True)以及标签的字体大小以提供帮助删除可能已创建的任何空白区域
I know this is a long time answered, but I wanted to elaborate some more... you can also force the Label Auto Fit Settings (Prevent Font Grow/Shrink/Offset/Wrap to True) alongside a font size for the label to help remove any white space that may have been created