Search code examples
reporting-servicesssrs-2012ssrs-tablix

Hid or show parameter based on selected parameter/filter


I have two datasets which shows to drop downs for parameter selection.

one is called ResoursesFilter

select distinct(F17) AS [Filter] from Report_Resources where F17 <> ''

The other one is PlantFilter

select distinct(F11) AS [Category] from Report_Resources where F11 <> ''

Resourses filter returns

enter image description here

I only want Plant Filter to be visible / enable if Plant is selected in the Resourses Filter.

Plant Filter is only applicable if Plant is selected

If Plant is not selected on the Resources Filter I do not want to be able to select anything in the Plant Filter (Possibly disabled or hidden)

enter image description here

Not sure if it is possible to hide the Recourses Filter in this case


Solution

  • You cannot dynamically hide parameters in SSRS but what you could do is show something like 'Not Applicable' as the only parameter value available.

    IF @ResoursesFilter= 'Plant'
        BEGIN
            select distinct(F11) AS [Category] from Report_Resources where F11 <> ''
        END
    ELSE
        BEGIN
            SELECT 'Not Applicable' AS [Category]
        END
    

    You might have to handle ignoring this value in the main dataset but that should be simple enough.