cancel
Showing results for 
Search instead for 
Did you mean: 

Running total from main report to subreport

Former Member
0 Kudos


Good day!

I am new to Crystal Report. I am trying to add a subreport, is it possible to pass the running total from the main report to subreport? How?

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Sharmane,

1) Right-click the Subeport > Change Subreport links > Move the Running total field from the pane on the left to the pane on the right > uncheck the option 'Select data in subreport based on field'

2) Inside the subreport, you should see this running total as a 'parameter'

Another way to do this is to create a shared variable formula:

shared variable x := {#RunningTotal};

You can then create another formula inside the Subreport that refers to this variable like so:

shared variable x;


The only thing to remember is that for this shared variable to work inside the subreport, the first formula needs to be in a section above the section that holds the subreport.


-Abhilash

Former Member
0 Kudos

I tried the #1 and it works, thanks!

What if the reverse situation? I want the running total from subreport appear on the main report. How can I do that?

abhilash_kumar
Active Contributor
0 Kudos

For the reverse scenario, using a shared variable is the only solution.

-Abhilash

Answers (0)