Showing the prompt values in report based on security
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.
Getting ready
Create a simple list report with Country, City, Product line, and Sales Quantity as columns.
How to do it...
We will start by adding a filter for countries. For that, go to Query Explorer and insert a new detail filter. Define it as:
[Country] in ?Countries?
Ensure that this filter is mandatory.
Now, add a new prompt page. Drag a value prompt on to it.
Follow the prompt wizard to set the following:
Link it to existing parameter called 'Countries'.
Create a new query for this prompt and call it 'Countries'.
Go to Query Explorer and open...