简体   繁体   English

SSRS中的指标

[英]Indicators in SSRS

I have a column in SSRS report. 我在SSRS报告中有一列。 The value is "True" or "False" or "Yes" or "No" or "1" or "0" 值是“ True”或“ False”或“ Yes”或“ No”或“ 1”或“ 0”

Instead of showing that in that column, I would like to use indicator. 我不想在该列中显示它,而是要使用指标。

I placed indicator in that column but need to set start and end property. 我将指标放置在该列中,但需要设置start和end属性。 How do I go about doing it so I can show green checkmark when it's "True", "Yes", or '1" and red otherwise? 我该如何去做,以便当它是“ True”,“ Yes”或“ 1”时显示绿色的复选标记,否则显示红色?

I am trying =IFF(Fields!Column_name.Value = "True", "Red", "Green") for the Start value for Green Check mark...but obviously I am wrong... 我正在尝试使用= IFF(Fields!Column_name.Value =“ True”,“ Red”,“ Green”)作为绿色复选标记的起始值...但显然我错了...

any help? 有什么帮助吗?

Well maybe its just a typo in your question but a couple things stand out 好吧,也许这只是您的问题中的错字,但有两点突出

  • the function is IIF, not IFF 函数是IIF,而不是IFF
  • The True result should come first after the condition 真正的结果应该在条件之后优先

I've never used the indicators before, but looking briefly at them, it looks like you can define ranges that are acceptable (green), unacceptable(red), or in the middle (yellow). 我以前从未使用过这些指标,但是简要地看一下它们,看起来您可以定义可接受(绿色),不可接受(红色)或中间(黄色)的范围。

Start and End should probably be numeric values, "Green" and "Red" don't seem like valid values. 开始和结束可能应该是数字值,“绿色”和“红色”似乎不是有效值。

Try binding the indicator value expression to something like this. 尝试将指标值表达式绑定到类似这样的东西。

=IIF(Fields!ColumnName.Value = "True" OrElse
    Fields!ColumnName.Value = "Yes"  OrElse
    Fields!ColumnName.Value = "1", 100, 0)

Go to the Indicators properties > Values And States and put the Check's Start & End Value to 1 . 转到指标属性>值和状态,然后将支票的开始和结束值设置为1 And the X put it's Start & End Value to 0 . X则将其Start&End Value设置为0

Then write your expression like this: 然后像这样写你的表情:

=iif(First(Fields!YourField.Value, "YourDataSet")=True,1,0)

That should give you a Check if checked or an X if not. 这应该给您一个Check(如果已选中)或X(如果未选中)。

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

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