James Khan
James Khan

Reputation: 841

SSRS 2012 issue around multi valued parameters

I have a parameter question in SSRS . I currently have 3 parameters set up, Permanent Employee then select P, Temporary Employee then select T and Partner Employee then select P.

So the user selects parameter one , Permanent and then selects parameter two, Temporary and then the third parameter, Partner.

This then feeds into my sql query to return the result set....like below .

AND (A.[EMPTYPE]=@EmploymentP1 OR A.[EMPTYPE]=@EmploymentP2 OR A.[EMPTYPE]=@EmploymentP3 )

So the question if I wanted one parameter that will allow one or more of the values to be selected, Permanent , temporary or Partner to be selected. How to do this ? So a multi value parameter in SSRS. But how do you then feed those results into the query is the bit I dont understood yet. Any ideas?

Upvotes: 0

Views: 48

Answers (1)

GarethD
GarethD

Reputation: 69749

If for example your single parameter was @Employment, you would use:

WHERE   A.[EMPTYPE] IN (@Employment)

SSRS Internally parses this to valid syntax before sending the query to the database.

Upvotes: 1

Related Questions