locked
SSRS dataset filter RRS feed

  • Question

  • User-373571878 posted

    Hello,

    I have an SSRS report that I have a parameter and a filter.   Records comes in with a field called Clocked that contains either 'No' or 'Yes'. 

    When the user selects either one from a dropdown parameter and views report, the filter only brings back those records that were selected, being 'No' or 'Yes'.

    Now the users want another option:  'Both', but the field in the record only contain the words 'No' or 'Yes'. 

    Is there a way to build an expression for the filter that states if the parameter selected is a 'both' then bring back all records. If not it must be a 'No' or 'Yes' so bring back those records where the field Clocked matches what is in the Clock Parameter?

    like:  =IIF Parameters!Clocked.Value = "Both", Fields!Clocked.Value <> "", Parameter!Clocked.Value)   Or something to that affect.

    thanks!

    Wednesday, July 24, 2019 5:50 PM

Answers

  • User475983607 posted

    Use a wild card, %,  if both is selected.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2019 6:01 PM
  • User-373571878 posted

    Never mind,  I tried an * asterisk and that worked for the wild card. Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2019 6:51 PM

All replies

  • User475983607 posted

    Use a wild card, %,  if both is selected.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2019 6:01 PM
  • User-373571878 posted

    thanks mgebhard,

    I just tried using,  Clocked <> 'Yes', which gives me all the 'No', <> 'No' which gives me 'Yes' and then Clocked <> 'Both' which gives me all.  So that worked

    I went back to try your suggestion (making clocked 'like' 'Yes', or 'like' 'No', and I tried Like %, but it did not return any records.

    Did I do something wrong?

     

    Wednesday, July 24, 2019 6:42 PM
  • User-373571878 posted

    Never mind,  I tried an * asterisk and that worked for the wild card. Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2019 6:51 PM