dynamic filtering in SSRS

  • As much as I am not a huge fan of Access, creating dynamic filters in Access is pretty easy... create a valid filter in a string variable and open the report passing said string, and you're off to the races. (Of course, that requires buttons or something that responds to a Click event or similar...)

    I know how to create filters that the user can choose from in SSRS, but what if they want something that's a little more complicated/flexible? Do I have to just offer all the possible filter parameters and set them to default to NULL? Is there a way analogous to the Access hack (yeah, but it's super flexible and effective.)
    is there a useful article on it somewhere? (Gotta learn somehow!)

    Thanks! (If it matters, I'm using SSRS 2016)

    Pieter

  • Could you define more complicated/flexible? I've found SSRS to be quite flexible, so it would be good to know what your aim is and why you're struggling.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Not necessarily the same as Access...which really is easy.
    I think to get close to the way Access does it and avoid all of the parameters, it would need to be client side so creating some rdlc report dynamically in an application would be similar.
    Otherwise for hosted RDL reports, you can get fairly flexible with a ton of parameters. However, it can get pretty convoluted and you can run into performance issues - just like you would with "catch all" queries. I know you would have already searched on and read things about it. Not sure if you saw this post but it has examples of reports with dynamic columns, groupings, datasets. So if you were really looking for some pain, you could try combining all of the techniques he uses 🙂
    Advanced Matrix Reporting Techniques

    Sue

  • Thanks Sue. I'll have a look.
    I may not have been thinking... probably the really simple answer is "Mark the optional parameters as optional!"  Yeah, "here's my sign!" =)

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

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