简体   繁体   English

SSRS 表达式不会影响图表标题的可见性

[英]SSRS Expression will not affect chart title visibility

I'm trying to use an expression in the visibility tab of the Chart title properties window to hide the chart title based on a Boolean parameter.我正在尝试使用图表标题属性窗口的可见性选项卡中的表达式来隐藏基于布尔参数的图表标题。 parameter will hide other parts of the chart, but will not hide the chart title.参数将隐藏图表的其他部分,但不会隐藏图表标题。

I've tried using both switches, and IIF statements to verify that my code was working in other parts of the chart.我已经尝试使用开关和 IIF 语句来验证我的代码在图表的其他部分是否有效。 I can hide the body, legend, and even the entire chart.我可以隐藏正文、图例甚至整个图表。 Nothing I do will affect the chart title, however.但是,我所做的任何事情都不会影响图表标题。

=IIF(Parameters!Visible.Value = FALSE, FALSE, TRUE)

The chart title should no longer be visible, but instead remains visible and unaffected.图表标题不再可见,而是保持可见且不受影响。

One work-around that I've used is to simply delete the chart title, and use a text box instead, which does react to the parameter's value, but I'm really wondering why I can't seem to get the chart title to hide based on the expression.我使用的一种解决方法是简单地删除图表标题,而是使用一个文本框,它确实对参数的值做出反应,但我真的很想知道为什么我似乎无法将图表标题设置为根据表达式隐藏。

You thought you were angry before - this seems to be yet another bug that will probably never be fixed.你以为你以前生气了 - 这似乎是另一个可能永远不会修复的错误。

The Chart Title Visibility works, if you also use a Boolean True or the same function for the Caption (the text display in the title).如果您对标题(标题中的文本显示)使用布尔值True或相同的函数,则图表标题可见性有效。 Ugh.啊。

This Caption makes the Title invisible.此标题使标题不可见。

在此处输入图片说明

Maybe you can make this lameness work for you though - have the caption property be the title if visible or True if not:也许你可以让这种跛脚为你工作 - 如果可见,则将标题属性设为标题,否则设为 True:

=IIF(Parameters!Visible.Value = FALSE, "Caption Title", CBool(1))

Since every bug that I've cared about is Closed as Won't Fix or WAD, I wouldn't bother submitting this one to Microsoft.由于我关心的每个错误都已关闭为无法修复或 WAD,因此我不会费心将这个错误提交给 Microsoft。 I know - it's so disappointing.我知道 - 这太令人失望了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM