Larry
Larry

Reputation: 3

Report Builder 3.0 using multiple values in parameter not working with IN Statement

I am trying to use a multi value parameter in my query statement rather than using a filter, however when using the IN command it is not using my parameters given. I have used the JOIN Function to join the values and tried adding quotations around the value or without, neither seems to have any effect on the query the report does not bring up any results with the given to_date and values provided in the IN statement via the Parameter. Please could someone help

Query

SELECT a.ha_code FROM a WHERE a.from_date <= ? AND a.to_date > ? AND a.ha_code != 'CT' OR a.to_date = ? AND a.ha_code IN (?)

Parameter

=join(Parameters!ReportParameter2.Value,",")

Parameter2

Upvotes: 0

Views: 389

Answers (1)

Greg Low
Greg Low

Reputation: 1586

Even though it is not valid T-SQL, in both SSRS and RB, you can have a WHERE predicate with IN (@ParameterName) when working with multi-value parameters.

Upvotes: 0

Related Questions