Print Page | Close Window

Totaling multiple autosum fields to get grand tota

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16089
Printed Date: 02 May 2024 at 7:05am


Topic: Totaling multiple autosum fields to get grand tota
Posted By: MadMan
Subject: Totaling multiple autosum fields to get grand tota
Date Posted: 04 Apr 2012 at 6:01am
Hello,
I'm a newb to Crystal Reports and I'm tring to work on a report for a friend.  There is a Main Report and 3 sub reports. The Main report is using a date range to gather information on mainenance records / costs on pieces of equipment.
 
The first subreport lists the work done and the cost of the labor for inhouse maintenance. The second subreport lists the cost of the parts needed. And the 3rd subreport lists any associated costs for parts and labor for work done outside of our organization... ie work from an outside vendor.
 
I've been able to figure out how to do totals for the cost associated with each subreport. What I would like to do is get grand totals for the report of all the total costs from the subreports. (ie : totals for all labor, totals of all parts, and outside vendor. )  Is there a way to set up a grand total field in the reports main footer?  Coding involved?
 
thanks
Madman



Replies:
Posted By: DBlank
Date Posted: 04 Apr 2012 at 10:42am
you need to use shared variables.
You create them in the sub reports and
set them = to the summary value
then pass that values to the main report
in the main report footer you can add the 3 formulas together.


Posted By: MadMan
Date Posted: 05 Apr 2012 at 3:31am
Thank you for your response with this...Smile Would you have any code samples that I could look at to get an idea how to do this?  I've just started using CR 4/2/12, so I am brand new to this.. and any tips would be much appreciated
 
many thanks in advance...
 
madman


Posted By: DBlank
Date Posted: 05 Apr 2012 at 3:39am
http://www.codeguru.com/forum/showthread.php?t=449494 - http://www.codeguru.com/forum/showthread.php?t=449494
 
should help you.
There are tons of posts for examples of this on this site as well.


Posted By: MadMan
Date Posted: 05 Apr 2012 at 4:07am
Excellent...!!!
 
thanks much!!!


Posted By: MadMan
Date Posted: 05 Apr 2012 at 9:44am
Worked like a charm....!!
 
 
thanks again...Clap
Madman



Print Page | Close Window