How to cascade parameters in SSRS having specific values

十年热恋 提交于 2019-12-02 12:32:27

Yes, it's easily achievable. The trick is to make a dataset dependent on just the first parameter, and use it's results for the available options of the second parameter.

A little more detail on how you'd make that happen:

  1. Create the first parameter with options. (GroupBy1)

  2. Create a dataset that uses that parameter either in Where or as a filter.

    SELECT 'Web' as Department WHERE 'IT' in ( @GroupBy1 )
    UNION ALL
    SELECT 'Database' as Department WHERE 'IT' in ( @GroupBy1 )
    UNION ALL
    SELECT 'Accounts Payable' as Department WHERE 'Accounting' in ( @GroupBy1 )
    UNION ALL
    SELECT 'Shipping' as Department WHERE 'Warehouse' in ( @GroupBy1 )
    UNION ALL
    . . .
    
  3. Create a parameter that uses that data set as available options. (GroupBy2)

Use any combination of these parameters in your core data query or filters.

One restriction is that the parameters must be ordered in the report so that GroupBy1 is before GroupBy2.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!