Solved

SSRS 2008 Multi Value Parameter Filter using OR

Posted on 2016-11-11
3
30 Views
Last Modified: 2016-11-14
Hello experts -

I am trying to use a multi value parameter to filter two different fields in a tablix. However, SSRS does not allow me to specify OR when adding filters. For example, the user selects options in the multi valued parameter and then those choices are used to filter two different fields in an OR statement

Parameter: 'Choose Event Type:' [user selects] J, R

I want the tablix to return all rows with a Start Event of J, R OR all rows with an End Event of J, R

In the attached example, I would want rows 10, 24, and 25 to be returned.

I originally had one filter setup to use for both fields but abandoned that in favor of two fields, please see the attached screen shot of SSRS.

Thank you.

-- Lisa
SSRS-Multi-Value-Example.xlsx
Filters-in-SSRS.JPG
0
Comment
Question by:ldcallahan
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
ID: 41885347
You can't use an OR statement using the interface like you're suggesting, but you can still do it - it just requires you write the OR statement as a single filter condition and then check if it's a valid row inside the formula. If it is, you can set the "output" of your formula to 1 and then just have the filter check if the value is 1 before deciding to filter the row.

If that's confusing or doesn't make sense, I can add an example later.
0
 

Author Closing Comment

by:ldcallahan
ID: 41886263
Thanks. I actually realized that as well but am glad for the external validation :)

I actually ended up writing a split function that produces a table in SQL and then joining the result set to that. It works great and actually saves a bit of processing time.
0
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 41887290
I've done that as well - I wish there was a more graceful way to handle OR and multi-value parameters, but I'm glad you found a method that gets the job done!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now