Drop down list of user specific values as parameter

  • Hey

    I have a report showing a simple table with data from a Stored Procedure. In order for the table to be populated, the user have to select a date period, and a device to view data from.

    I want to show the available devices in a drop down list, that the user can choose from. The list of devices should be populated only with devices that the current user have access to in the database.
    I have made a stored procedure (GetDevices), which takes the SSRS User name value (ssrs_UserName) as a parameter, and extracts a list of Devices and Device ID's. 
    I have changed the "Device" parameter options "Available values" to "Get values from query", and I have selected my aforementioned stored procedure, and added the Value and Label values. In the parameters for the "ssrs_UserName" I have set the "Default value" option to "Specify values" and I have used the "Fx" button to select the "User" value. 

    However, when I preview the report I get this error:

    The report parameter 'DeviceId' has a DefaultValue or a ValidValue that depends on the report parameter "ssrs_UserName". Forward dependencies are not valid.

    The error message is quite clear as to what the problem is, so my question is this:

    Is there anyway to do this without getting this error?

    In other words: How can I get an SSRS User depended list of devices to populate my Device parameter drop down list?

    Thanks in advance

    /Søren

  • DOH!!

    I figured out what the problem was - I really should have figured it out sooner tbh!

    The parameter for the drop down list was initially added after the parameter for the device drop down.
    SOLUTION:

    Move the ssrs_UserName parameter up in front of the Device parameter

    Simple as that - leaving this here for others to see if they make the same mistake I did 🙂

    /Søren

Viewing 2 posts - 1 through 1 (of 1 total)

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