简体   繁体   中英

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").

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.

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","")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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