cancel
Showing results for 
Search instead for 
Did you mean: 

Add Totals to Main report from 3 subreports

Former Member
0 Kudos

I have a main report with 3 subreports (in footer A, B, C). Each subreport has a Total field in it. Is it possible to add a field to the main report that will add each of the Subreport totals?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

It worked! Awesome! Thank you.

Former Member
0 Kudos

Hi Shannyn,

Create a formula in main report as:

Shared a;

a;

Create a formula in subreport and place in detail section:

Shared numbervar a;

a:={customer.customer ID};

a;

We can download Sample Reports from [here|]

Regards,

Shweta

Former Member
0 Kudos

Hi

I would like to add few important points in the formula.

1) The shared variable which you have created must be inserted in the subreport otherwise sometimes it shows blank space in the main report.

2) Crystal Report executes section wise.If you have inserted the shared variable in report footer a, b and c and you are inserting the shared variable values in detail section then it will not show any data because formula is not calculated in the subreport yet.

If you want more explanation on this please do let me know.

Regards

Asha.

Former Member
0 Kudos

a few other points on shared variables,

do not surpress the section or the formula in the subreport or it wont pass the value

place the main report shared variable below the subreport, otherwise it wont display the value

Former Member
0 Kudos

Hi ,

Create a shared variable in each of the subreports.

Pass the shared variables which contains data from subreport to main report.

Created a formula in main report which will add these shared variables.

Hope it helps!

Regards,

Sumit Kanhe

Former Member
0 Kudos

Thanks. I've looked in the Help on how to do this but can't figure it out. How do I create a shared variable in each of the subreports? Do I create a formula? If so, what should the formula say and how do I share it amongst all the reports? Thank you again.