问题
I had done a fair share of research before asking this here. Firstly, i would like to create a drop-down filter @accessVar with the ability to select multiple values. It would be easy if not due to my special requirement. My dataset statement is:
SELECT PASS_M, ENTRY_DT, EXIT_DT, WORKED_HRS, ACCESS_LOCATION_X, IC_N, COMPANY_M, CONSECUTIVE_D
FROM TEMP_TARGET
WHERE (CONSECUTIVE_D >= @consecDays) AND (ENTRY_DT BETWEEN @startDate AND @endDate) AND
(ACCESS_LOCATION_X LIKE @accessVar) AND
(IC_N LIKE @icVAr)
However i need to make use the %wildcard for @accessVar(e.g 'BT%') hence i am unable to use the operator IN. What can i do? I am using SSRS2005. Please advice me.
回答1:
You can do this using Filter at the Data Set properties. Before that you need to remove the (ACCESS_LOCATION_X LIKE @accessVar)
from your data set query.
set the expression as follows[Modify your parameter name].
=ACCESS_LOCATION_X Like "*"+Parameters!param.Value+"*"
Then configure the Dataset properties Filter tab as follows.

After that you can run your report. Following screenshot searches for "en" word in the report data set and returns the result set.

Hope this helps!
来源:https://stackoverflow.com/questions/13857201/multiple-value-selection-and-optional-filter-in-ssrs-2005-report