Avatar of Jimbo99999
Jimbo99999
Flag for United States of America asked on

SSRS Passing Multiple Values(Specified Available Values) To Query

Good Day Experts!

As a previous other current question I have open, I am working on SSRS reporting of which I am relatively new to.  The query in question I have working in SQL Management Studio.
Knowing that I will need to be able to handle multiple values for a parameter to be processed by the query, I tested my query with a variable and the string 'Q1,Q2,Q3,Q4'. I could have used 'Q1,Q2' or 'Q4,Q3' to simulate the User selection from the dropdown list in the report.  At the top of my query, I first needed to build a function to process each value(Q1 Q2 Q3 Q4) in the list and retrieve the start and end dates for the value from a database table.  After doing that for each of the values in the list, I then built a string for my where clause that checks if a field, which happens to be a date, lies between the retrieved dates.  So, needless to say it was a bit tricky to generate the string but it is working now fine in Management Studio.  

The issue I am having now is that apparently the passing of multiple values to the query in the report is not in the format 'Q1,Q2,Q3,Q4' and my parsing apart and processing is failing.

I have found some information online but it is centered on the query using a "where in" clause in the query.  The other unique thing about this, is that I am specifying the values for the available values for the drop down list.  

So, I am not sure how a multiple value list of specified available values is passed to the query to know how to modify my process of parsing them apart.  

Does anyone have knowledge of reference links that may be able to point me in the right direction?

Thanks
Microsoft SQL ServerMicrosoft Server OSSSRSSQL

Avatar of undefined
Last Comment
Dung Dinh

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dung Dinh

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck