[英]ssrs expression based on parameter changing
I have two parameters in my chart report A and B. In the series group of chart I have field colour with three colour names("red","green","brown"). 我的图表报告A和B中有两个参数。在图表的系列组中,我具有三个颜色名称(“红色”,“绿色”,“棕色”)的字段颜色。
Here I need to write an expression when the parameter is "A", I should only see "red",Green" values in the field colour and if it is Parameter "B", I should see all the three colours. 在这里,我需要编写一个表达式,当参数为“ A”时,我只能在字段颜色中看到“ red”,Green“值,如果它是参数” B“,则应该看到所有三种颜色。
I tried different expressing using 我尝试使用不同的表达方式
=iif(Parameters!channel.Value="A" and Fields!COLOUR.Value="BROWN",O,Fields!COLOUR.Value)
But by writing this expression I can convert "brown" to zero value but I am not able to hide it. 但是通过编写此表达式,我可以将“棕色”转换为零值,但是我无法将其隐藏。
Any help plz? 有什么帮助吗?
Try putting this expression on field color: 尝试将此表达式放在字段颜色上:
"Red, Green"+ iif(Parameters!channel.Value="A", ", Brown","")
+
is used for concatenating two strings. +
用于连接两个字符串。
As put forward, &
is a better option for concatenating. 如前所述,
&
是连接的更好选择。
"Red, Green" & iif(Parameters!channel.Value="A", ", Brown","")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.