Can I Enable/Disable a date parameter?

  • Hi All

    Using SSRS 2008.

    I have a report where a user can view either open or closed jobs. If they're viewing closed jobs they will view jobs closed within a date range they select. If they're viewing open jobs they will simply view all open jobs, no date range required.

    So I want to enable/disable the date parameters based on what they pick in the "Open/Closed" parameter. I can live with them having the date range available to select if they pick open but, since it's going to be ignored it just feels a bit yucky. This feels like it should be easy to resolve and I'm probably missing the obvious but I just can't seem to think of a way to do this. Any suggestions?

  • You would use the hidden property of the parameters based on the value selected by the open/closed parameter.

    Use an expression like

    =IIF(Parameters!OpenClosed.Value = "Open", TRUE, FALSE)

    You will need to ensure that your parameter order in the report is such that OpenClosed is above the date parameters

  • Parameters don't have a hidden property as such do they? You've got the visibility option which is a radio button selection but there's nowhere to enter an expression.

    Am I missing something because that sounds like it would be ideal otherwise?

  • Doh, yeah I was getting confused with the hidden properties as I knew it had one but forgot it doesnt have a true properties section, I tried to hack the xml of a test report to build in a IIF expression on a parameter but it issues a type error detailing that its not a boolean value.

  • Oh well, I liked the thinking anyway 🙂

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

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