How to select multi values in SSRS
Hello, I am using Command Text, I would like to select multi values, i don't know where to write IN in my expression. Could please help me. Expression: ="select [Job Title], [Task Grade], [Group], Department, [Business Unit], [Line Manager], [Date Project Logged], [Date Advertised], [Closing Date], [Team Leader], Practitioner, [Project status], Comments, [Ciboodle Ref No/ Reference Number], On_Hold_Start_Date, On_Hold_End_Date, [Advert Type], [On-Hold Comment], [Successful Candidate], dbo.fnGetBusinessDays([Date Project Logged], [Closing Date], [Project status]) AS [Days To Fill], dbo.fnGetBusinessDaysHold(On_Hold_Start_Date, On_Hold_End_Date) AS [Days On Hold], Attachments FROM HR_Recruitment_Status WHERE Practitioner=" & "'"& Parameters!Practitioner.Value.ToString() & "' AND [Project status]=" &"'" & Parameters!Status.Value.ToString() & "' AND [" &Parameters!Start_Date_Category.Value &"] BETWEEN " &"'" &Parameters!Date_Range_Start.Value & "' AND '" & Parameters!Date_Range_End.Value &"' AND [Group]=" &"'" & Parameters!Group.Value.ToString() & "' AND [Team Leader]=" &"'" & Parameters!Team_Leader.Value.ToString() & "' AND [Advert Type]=" &"'" & Parameters!Advert_Type.Value.ToString() & "'" Could please provide me suitable solution. Thanks. Kind Regards
November 2nd, 2011 7:24am

select * from tbl where col=@par and col1 in (1,2,3)Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
Free Windows Admin Tool Kit Click here and download it now
November 2nd, 2011 7:48am

Hello, Thanks for your reply. I am struggling with Single quotes and double quotes in my Query.CommandText expression, i don't know where to put IN statement. Thanks.
November 2nd, 2011 7:58am

Hello, Thanks for your reply. I am struggling with Single quotes and double quotes in my Query.CommandText expression, i don't know where to put IN statement. Thanks.
Free Windows Admin Tool Kit Click here and download it now
November 2nd, 2011 7:58am

Hi Reddy Try Below [Team Leader] IN "&" "(" '" & Parameters!Team_Leader.Value.ToString() & "' ")" Suhas | MCP |MCTSMark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.
November 2nd, 2011 9:49am

Hi Reddy Try Below [Team Leader] IN "&" "(" '" & Parameters!Team_Leader.Value.ToString() & "' ")" Suhas | MCP |MCTSMark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.
Free Windows Admin Tool Kit Click here and download it now
November 2nd, 2011 9:49am

Hello Suhas, Thanks for reply.But it throwing as error: Error during processing of the CommandText expression of dataset ‘DataSet2’. (rsQueryCommandTextProcessingError) ---------------------------- Cannot set the command text for dataset 'DataSet2'. (rsErrorSettingCommandText) ---------------------------- An error has occurred during report processing. (rsProcessingAborted) Kind Regards
November 2nd, 2011 10:07am

Hello Suhas, Thanks for reply.But it throwing as error: Error during processing of the CommandText expression of dataset ‘DataSet2’. (rsQueryCommandTextProcessingError) ---------------------------- Cannot set the command text for dataset 'DataSet2'. (rsErrorSettingCommandText) ---------------------------- An error has occurred during report processing. (rsProcessingAborted) Kind Regards
Free Windows Admin Tool Kit Click here and download it now
November 2nd, 2011 10:07am

Hi RP, I recommend you that refer to the following articles, please see: Adding Parameters to Select Multiple Values in a List: http://technet.microsoft.com/en-us/library/aa337396.aspx Reporting Services Multi Value Parameter: http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/c02370b5-aeda-47ec-a3a8-43b2ec1e6c26/ Thanks, Bin Long Please remember to mark the replies as answers if they help and unmark them if they provide no help.
November 4th, 2011 1:51am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics