0

SQL Server Reporting Services (SSRS) - How to Check If a Parameter Contains a Certain Value in SSRS ?

Example:

I have a paramter named SubjectID which has few subjectID's say 603,604,605,607,608 . I want to return "Y" if the subject ID is 603,604 and 605 else return "N"

Is there any function to solve this issue?

VVN
  • 501
  • 1
  • 9
  • 21
  • Possible solution. http://stackoverflow.com/questions/17052101/using-ssrs-expressions-to-see-which-options-a-user-has-selected-from-a-multivalu – SS_DBA Oct 31 '16 at 13:51
  • =IIF(InStr("603,604,605", Parameters!SubjectID.Value) ,"Y","N") . Guess this too works using InStr function. – VVN Nov 01 '16 at 05:50
  • If we use IIF(InStr("603,604,605", Parameters!SubjectID.Value)>0 ,"Y","N") then it returns true or false , without the checking of zero it returns 0 and 1. – VVN Nov 01 '16 at 06:10
  • =IIF(Array.indexOf(Split("603,604,605,607,608", ","), Parameters!SubjectID.Value) > 0, "Y", "N") – reas Feb 02 '21 at 05:24

0 Answers0