title: Populate a parameter based on another parameter
body: <p>I'm new to SSRS, so I apologize if this question is too simple.</p>
  
  <p>I have two datasets:</p>
  
  <ul>
  <li>Accounts (AccountId, AccountName, AccountGroupId)</li>
  <li>ChildAccounts (ChildAccountId, ChildAccountName)</li>
  </ul>
  
  <p>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.</p>
  
  <p>So I have parameters: </p>
  
  <ul>
  <li>@AccountId parameter with settings: Available Values / Get values from a query / Dataset: Accounts, Value field: AccountId, Label field: AccountName. </li>
  <li>@AccountGroupId with settings: Default Values / Get values from a query / Dataset: Accounts, Value field: AccountGroupId.</li>
  </ul>
  
  <p>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.</p>
  
  <p>How can I make this work?</p>