Populate a parameter based on another parameter
reporting-services, ssrs-2008
Solution
Relatively trivial but what you want to do is use the variable for the Accounts parameter in your dataset for your second parameter (set under available values). In this case it should be @. So, for example, a parameter named accounts will define a variable called @accounts.
Just make this second dataset (for your other parameters available values) something similar to:
select AccountGroupID
from Accounts
where AccountName = @accounts
Any questions let me know :)
Problem
I'm new to SSRS, so I apologize if this question is too simple. I have two datasets: - Accounts (AccountId, AccountName, AccountGroupId) - ChildAccounts (ChildAccountId, ChildAccountName) The idea is that the user selects an account from the AccountName combobox which then populates the ChildAccounts dataset (and combobox) using the AccountGroupId from the selected AccountName. So I have parameters: - @AccountId parameter with settings: Available Values / Get values from a query / Dataset: Accounts, Value field: AccountId, Label field: AccountName. - @AccountGroupId with settings: Default Values / Get values from a query / Dataset: Accounts, Value field: AccountGroupId. The ChildAccounts dataset should then be populated using @AccountId and @AccountGroupId as parameters for the stored procedure. However, @AccountId seems to be passed correctly but @AccountGroupId just appears to be using the first value for AccountGroupId in the Accounts dataset, rather than the correct one for the selected AccountName. How can I make this work?