0

I'm trying to modify an existing matrix report written in SSRS 2008R2. It's an income summary report showing income & expenditure (as rows) by departments (as columns). It needs to be modified to show the percentage profit in addition to the existing monetary value. In order to calculate the percentage profit I need to retain (in a variable) the profit value for each row group (e.g. total revenue, total operating costs etc) and department. These retained values can then be used in the calculation.
This post (SSRS code variable resetting on new page) helped with the approach and required code but my issue is that the retained values only show the total for all departments and not for individual departments.
Can anyone advise on how to reset the variables so I see the correct value for each department rather than the total value? I've tried all sorts to no avail.
Thanks.

Community
  • 1
  • 1
  • name your cells and use the values directly with `ReportItem!TextBoxName.Value` – Daniel E. Jun 18 '14 at 12:35
  • Thanks for your speedy reply @DanielE. It was certainly worth a try and something I hadn't considered but in this context I need to store the value before it goes out of scope; and refer back to it when it is out of scope. Using ReportItems!name.value as it is only gives me the latest value of the named cell and not a value that occurred earlier in the report. – user3752242 Jun 18 '14 at 15:34
  • Another option is to have a separate dataset for the aggregates you need from SQL and use the SSRS `LOOKUP`function to get the values you need. – Daniel E. Jun 18 '14 at 17:06

0 Answers0