title: SSRS Total from sub-group to parent group
body: <p>I'm trying to calculate the total sum of a filtered child group in the cell "Anzahl" in the parent group. As you can see on the example screenshot, in the child group are two numbers 15 and 5 and the cell in the parent group show 24 instead of 20.</p>
  
  <p>Screenshots:</p>
  
  <p><a href="https://dl.dropboxusercontent.com/u/17838009/screenshot.jpg" rel="nofollow">https://dl.dropboxusercontent.com/u/17838009/screenshot.jpg</a>
  <a href="https://dl.dropboxusercontent.com/u/17838009/screenshot2.jpg" rel="nofollow">https://dl.dropboxusercontent.com/u/17838009/screenshot2.jpg</a></p>
  
  <pre><code>=Countrows("table1_dc_evn_vpkn") 
  </code></pre>
  
  <p>This throws the error: "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."</p>
  
  <p>All attempts with <code>=Sum</code>, <code>=Count</code> and <code>=IIF</code> queries give wrong results because it calculates without the filter of the child group.</p>
  
  <p>I've also tried with some custom code:</p>
  
  <pre><code>Public Total As Integer =0
  
  Public Function Sum(ByVal Value As Integer) As Integer
      Total = Total + Value
      Return Value
  End Function
  </code></pre>
  
  <p>This didn't work either.</p>
  
  <p>I'm searching for a possibility to get access on the content within the child group cells from the parent group. I think about something similar to:</p>
  
  <pre><code>=Sum(ReportItems!Textbox90.Value)
  </code></pre>
  
  <p>which doesn't work because of: "Aggregate functions can be used only on report items contained in page headers and footers".</p>
  
  <p>How can I calculate the total sum of a filtered child group?</p>