SSRS “OR” Filter Logic to filter from “=” and “IN” Operators

后端 未结 2 1290
悲&欢浪女
悲&欢浪女 2021-01-16 04:08

I\'m working on a report where it needs to filter data from either of the two Built-in Fields. so I\'m using the \"FilterExpression\" to query my requirement based on the be

2条回答
  •  既然无缘
    2021-01-16 04:51

    I would use the InStr function to search for the State field in the list.

    Your expression would look like:

    =IIF(Fields!Country.Value = "United States" Orelse InStr("Washington,Minnesota,Tennessee, Oregon", Fields!State.Value) > 0, 1, 0)
    

    I usually use 1 and 0 for the filter values - SSRS doesn't always like the TRUE FALSE returned from expressions like 1 = 1 when comparing them as a boolean.

    Microsoft: Instr-function

提交回复
热议问题