开发者

SSRS 2008 - Filter Expression at Tablix Properties

I wrote the query and did not set up the "where clause" because I would like to have all values returned.

I set up the filter at the Tablix properties and allowed the users to select them as parameters.

I also set up a parameter to filter the result as well. Let's say that parameter's name is "p_location".

What I would like to do:

  1. If the user does not select anything in the parameter box, or parameter box is blank, return everything. Another word, do not filter anything.

  2. If the user types something in the parameters, filter that parameter against a field name.

I wrote this in the expression and it does not seem to work:

= IIF(IsNothing(Parameters!p_Location.Value),"",Fields!Location.Value)

Then, I select LIKE to be my operator

Then, the value box = Parameters!p_location.value

The user will type the search using the % at the end in order to obtain the result.


Is it possible to set up with th开发者_如何学Ce word "ALL" in this parameter box to return everything? If I set it up this way, the filtering might not work because it contains some value, instead of blank.


Thanks in advance.


  1. It is necessary to choose the properties for the parameters: "allow null", it is crucial.

  2. You need to choose the default value of "null"



When using the tablix filter, you need to use * as a wild card. In parameters, set the default value to *.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜