Search code examples
reporting-servicesreportssrs-2008reportingssrs-2012

Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope


I have a report where I have several static rows, each row has it own filters and group, the field Prem is calculated based on the filters set for each row group. I need to summarize all the rows into one total:

=ReportItems!TextBox248.Value + ReportItems!TextBox249.Value + ReportItems!TextBox250.Value + 
 ReportItems!TextBox251.Value + ReportItems!TextBox252.Value + ReportItems!TextBox253.Value + 
 ReportItems!TextBox254.Value

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

The Value expression for the text box ‘Textbox267’ refers to the report item ‘TextBox248’. Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope. Letters in the names of report items must use the correct case.

enter image description here enter image description here


Solution

  • Pretty simple solution here really, but SSRS is case-sensitive. Looks like your expression uses TextBox when the names of the textboxes are actually Textbox. So simply, you should use this expression.

    =ReportItems!Textbox248.Value + ReportItems!Textbox249.Value + ReportItems!Textbox250.Value + 
     ReportItems!Textbox251.Value + ReportItems!Textbox252.Value + ReportItems!Textbox253.Value + 
     ReportItems!Textbox254.Value