Solved

Multi-Value Parameter in SSRS report 2005

Posted on 2011-03-17
1
663 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 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