We help IT Professionals succeed at work.

SSRS Passing Multiple Values(Specified Available Values) To Query

152 Views
Last Modified: 2018-10-09
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
Comment
Watch Question

DBA and Business Intelligence Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.