Solved

Multi-Value Parameter in SSRS report 2005

Posted on 2011-03-17
1
651 Views
Last Modified: 2012-05-11
I would like to show a multi-value option in SSRS 2005 Reporting Services that gives me the option to choose which question number from a survey  (There are 4 questions on the survey). The problem that I am running into is when I go into preview mode, and choose the drop down list, it shows me every answer for every question, meaning  duplicate results for question 1, duplicate results for question 2 and so on. I want to just choose question 1 from the drop down list, and it will filter only question 1.
When I do this in the dataset -------and sr.questionID in (@questionid) it works perfectly.
When I try to do this from the report preview after – the query and using the report parameters functions, it shows me every possible result.
How do I collapse all (questions 1-4) from the preview like it does from the query in the dataset?
 I am  -and sr.questionID in (@questionid) when using the SSRS reporting parameters.
 I only want one question 1, and one question 2 I tried this to join the values but it didnt work This is the query used. I -- the @questionid when using the paramters toolbox
select s.personid,hh.name as HouseholdName,i.lastname +', '+ i.firstname as Guardian,r.name as relationship,s.surveyid,sr.questionid as Question,
case sq.description
when 'PTO: Please choose below' then 'PTO permission'
end Description,
case sr.response
when 'No, Do not allow my information to be shared' then 'N'
when 'Yes, I allow my Information to be shared' then 'Y'
end Response,
r.personid2 as StudentPID,p.studentnumber as studentid,
i2.firstname + ', '+
i2.lastname as Student,
h.householdid,
hh.phone
from dbo.SurveyResponse s
inner join [identity] as I on i.personid = s.personid
inner join surveyquestionresponse as sr on sr.responseid =s.responseid
inner join surveyquestion as sq on sq.questionid = sr.questionid
inner join relatedpair as R on r.personid1 = s.personid
left outer join [identity] as I2 on I2.personid = R.personid2
left outer join person as p on p.personid = I2.personid
left outer join householdmember as h on h.personid = p.personid
left outer join household as hh on hh.householdid =h.householdid
where  r.guardian = '1' and h.enddate is null --and sr.questionID in (@questionid)

Open in new window

QuestionID.JPG
Report-Parameters.JPG
0
Comment
Question by:Emi975
1 Comment
 

Accepted Solution

by:
Emi975 earned 0 total points
ID: 35162322
Nevermind, I figured it out.

I created a new dataset as dataset 1
Query:select distinct questionid as question
from surveyquestionresponse

I then made sure the report parameters shows the questionid as the name instead of report_parameter_1 because that doesn't link with the parameter values.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

21 Experts available now in Live!

Get 1:1 Help Now