This recipe combines the techniques learned in prior recipes to achieve a business requirement. A report shows sales data by country and product line. Users can choose to see data for one or more countries.
However, we need to implement a security mechanism such that a user can choose only those countries to which he is supposed to have access. This is determined by the user groups he belongs to.
Create a simple list report with Country, City, Product line, and Sales Quantity as columns.
[Country] in ?Countries?
Ensure that this filter is mandatory.
[Country] in (#CSVIdentityNameList(',')#)
This recipe simply combines the technique we learnt in prior recipes. We use CSVIdentityNameList()
macro to retrieve the user group information.
We use this macro in the prompt query in order to restrict the values coming through in the value prompt. Whatever values are selected by users are then passed as a standard parameter for filtering to the report query.