IIF expression with multivalue parameter

  • Hello,

    I have a report that is driven/filtered based on a multivalue parameter, so far it is working but I’m attempting to add some visual aspects to the report and having some difficulties in that area.

    Scope of the report is when the report is first opened up it will default the @globalgroup parameter to 4 values based on a query and all data is filtered based on that, ie. Group1,Group2,Group3,Group4

    Even though all these values are available through the parameters area, I have added a pivot table on the report to simulate tabs to display the groups available, I have then linked each of the columns back to the same report passing along the group name so that if a user clicks on the group it will filter the data based on his selection, without having to rely on the parameters pull down area.

    Question/problem.

    I would like to have the background fill color for pivot table be a certain color when the report is initially opened, but once you click on a group link then that item selected will have a different fill in color to make it a bit more obvious that that is the data you have filtered on.

    At the moment I can get columns 2, ,3 ,4 to work this way using the following

    =IIF(Fields!Column2.Value = Parameters!globalgroup.Value(0), "LightSkyBlue", "WhiteSmoke")

    The behaviour on column1 is that it defaults to being highligted “LightSkyBlue” because it will always be the first value in the paramter.

    The behaviour that I’m looking for column1 would be, if there is more than one value in the paramter then default to standard color and if it is just the single value that equals column1 then highlight it.

    I know I’m duplicating the same funtionality provided by the parameters area, but some people are just to lazy to click on the pull down, to view the parameters and select what they need.

    I’m also open to other suggestions as to how best to display this, the idea is to make it very obvious as to what the user has selected, highlighting the background seemed obvious.

    Any ideas would be appreciated, thank you

  • I was able to work around this by addeding the following expression to column1

    =IIF(Fields!Column1.Value = Parameters!globalgroup.Value(0) and Parameters!globalgroup.Count = 1 , "LightSkyBlue", "WhiteSmoke")

    the default count is always more than 1, so this will only be highlighted when that particular value is selected.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply