Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum a running total from a main report and subreport 1

Status
Not open for further replies.

llunde

Technical User
Sep 21, 2009
14
US
I need to add a running total from a main report to a running total form a subreport. What is the best way to do this.
 
You would have to set up a shared variable for the running total in the subreport footer:

whileprintingrecords;
shared numbervar subrt := {#yourrt};

Then in the main report, in a section below the one containing the subreport, you can add a formula like this:

whileprintingrecords;
shared numbervar subrt;
{#mainreportrt} + subrt

-LB
 
Thank you for your response!
I am sorry but I am a novice at Crystal.
How do I set up a shared variable for the subreport.
Is it just done as a formula?

LL
 
Yes, create a new formula and set it up just like this and place it in the sub footer:

whileprintingrecords;
shared numbervar subrt := {#yourrt};

...except replacing the {#yourrt} with your actual running total field.

-LB
 
Thank you for all your help that worked!

LL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top