SSRS Report Filter on a Data set

  • Hi All,

    I have a report, where i am using a parameter to filter the Report.

    The Filtration is done using Report Dataset Filter.

    Now, i want to set an expression to that filter , like, If The Parameter Value is 0, then all the data should be displayed i.e. (No data is filtered or we can say as, Select all is applied). or, If its is not 0, then Filter the data set according to the Value passed to by the parameter value.

    Any Help will be appreciated . Waiting for Quick responses.

    🙂

  • is there anyone , who can help me with this.?

  • You could use and expression for a filter and evaluate it as a boolean.

    E.g.

    Set Expression to:

    =Parameters!Species.Value = "All" OR Fields!Species.Value = Parameters!Species.Value

    Set the type as 'boolean'

    Operator as '='

    Value as true

  • For this you need to make changes in your dataset query.

    Make some changes in the WHERE clause

    i,e

    Where

    (@Param is NULL) or (@Param is not NULL and (yourfield=@Param))

  • Not necessarily. It was originally stated he was using dataset Filters rather then a clause to filter the query itself.

    There are reasons to use a dataset filter over a where clause in the query.

    If you are caching the dataset it can avoid the query being rerun against the database. Also if you are using a shared dataset in several reports you can filter at the dataset level in your report leaving the actual shared dataset unfiltered.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply