Multiple value selection and optional filter in SSRS 2005 report

。_饼干妹妹 提交于 2019-12-20 05:52:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!