Skip to Content

Calculate sum of subreport values

Dec 15, 2017 at 08:39 PM


avatar image

I have a report that had to be built using subreports.

How can I calculate an overall sum from multiple sub reports and put this total in the main report?

(Our IT Director helped me get started with report and he looked at the information needed to pull and it had to be built this way. )

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Abhilash Kumar
Dec 16, 2017 at 11:47 AM

Hi Alexia,

Use a 'shared variable'.

For e.g. Open Subreport 1 and create a formula with this code:

shared numbervar gt := gt + {summary field};

Drag and drop this formula field on a section this needs to be calculated on.

Create the same formula in all subreports and place it on a section.

In the Main report, refer to this shared variable using this code:

shared numbervar gt;

Drag and drop it on a section 'below' the last of the subreports.


10 |10000 characters needed characters left characters exceeded