简体   繁体   中英

How to use LIKE in tablix filtering with OR keyword in SSRS

I have a Table in my SSRS report and I want to filter the incoming data using a LIKE statement. The data looks like

CtrlNo  OtherColumns
J-123      ...
K-2340     ...
R-3352     ...

What I want to show in the table is the data where CTRLNO starts with J- or R- . So I am going to "tablix properties", then the section "filters" and add my filter as below.

在此处输入图像描述

It works when I do not use the "OR" statement, but with "OR' it gives an error, see below.

在此处输入图像描述

I could not find the correct syntax for my filter. I've tried those below but no luck:

="R-"+" " OR "J-"+" "

=(("R-"+" ") OR ("J-"+" "))

How can I use LIKE filter for a tablix with OR keyword? Any help would be appreciated.

Use this expression:

="[R,J]-*"

It shows all rows where the first character is R , or J and the second character is - .

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