title: SSRS Expression: The value expression for textbox has scope parameter that is invalid for aggregate
body: <p>i'm recieving the following error:</p>
  
  <pre><code>Error   1   [rsInvalidAggregateScope] The Value expression for the text box 
  ‘Textbox2’ has a scope parameter that is not valid for an aggregate function.  
  The scope parameter must be set to a string constant that is equal to either 
  the name of a containing group, the name of a containing data region, or 
  the name of a dataset.
  </code></pre>
  
  <p>The expression behind my Textbox2 (i've added some spaces for readability): </p>
  
  <pre><code>Iif(Parameters!ReportParameterPersoneelsNr.Value.Equals(String.Empty),
  
         "Prestaties " + First(Fields!firmanaam.Value, "DataSetHrm") + 
          "(" + First(Fields!indienstfirmanr.Value, "DataSetHrm") + ")",
  
         "Prestaties " + First(Fields!naam.Value, "DataSetHrm") + " " +
         First(Fields!voornaam.Value, "DataSetHrm") + 
         "(" + First(Fields!personeelsnr.Value, "DataSetHrm") + ")")
  </code></pre>
  
  <p>The fields:</p>
  
  <pre><code>      ReportParameterPersoneelsNr = Reportparameter of type Text
        firmanaam.Value = VARCHAR
        indienstfirmanr.Value = Long
        naam.Value = VARCHAR
        voornaam.Value = VARCHAR
        personeelsnr.Value = Long
  </code></pre>
  
  <p>Searches on Stackoverflow brought me following results. But so far they haven't helped me solve my problem</p>
  
  <p><a href="https://stackoverflow.com/questions/15818657/what-does-scope-parameter-that-is-not-valid-for-an-aggregate-function-mean">Post 1: what-does-scope-parameter-that-is-not-valid-for-an-aggregate-function-mean</a></p>
  
  <p><a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=120552" rel="noreferrer">Post 2: SqlTeam</a></p>
  
  <p>Could someone point out what i'm doing wrong?</p>
  
  <p><strong>Note</strong>: Adding tostring() everywhere didn't help</p>
  
  <p><strong>Note 2</strong>: Replacing the '+' with '&amp;' didn't resolve the issue either</p>
  
  <p><strong>Note 3</strong>: The datasetname is correct and the dataset is the only one present in this SSRS report:</p>
  
  <p><img src="https://i.stack.imgur.com/FvYPx.png" alt="Image Tds"></p>
  
  <p><strong>Update:</strong> The data contained by the dataset is valid and readding the dataset did not work (tried with and without aliases)</p>