NO Filters in DataSet if Variable is Null

  • Hi I have a Dataset In SSRS Report and I added Filters with my condiation as = @Variable .

    I am getting the results as expected for my condition . If my variable is NULL i need to retrive all my rows with out filter ,So can one suggest with an idea Thanks in advance

  • RamSteve (2/11/2014)


    Hi I have a Dataset In SSRS Report and I added Filters with my condiation as = @Variable .

    I am getting the results as expected for my condition . If my variable is NULL i need to retrive all my rows with out filter

    You could do something like:

    WHERE condition = COALESCE(@Variable, condition)

    That way, if the variable is Null, in essence you're saying 1 = 1, which is always true.

    HTH,

    Rob

Viewing 2 posts - 1 through 1 (of 1 total)

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