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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum a field located in the detail section

Status
Not open for further replies.

EMSI9988

Technical User
Jan 31, 2013
3
US
Crystal 11.
I'm retriving a shared numbervav from a sub-report and it appears as a field in the main report. On the detail line I have a formula (@extended) that uses the shared numbervar field (@cost) formula is shared numbervar STD; @COST is being multipliedt against another number field and that works fine. (@extended formaula is quantity * @cost
When I right click on @extended and go down to INSERT I have no option for Summary or running total. The only option is field heading.

Any thoughts on how to get @exteneded to sum up all of the details lines?

I appreciate any thoughts that can help me

Bill D.
 
You can collect it in a variable. Create three formulas:

//{@reset} for the group header (assuming you are summing at some group level):
whileprintingrecords;
numbervar sumext;
if not inrepeatedgroupheader then
sumext := 0;

//{@accum} to be placed in details:
whileprintingrecords;
numbervar sumext := sumext + {@extended};

//{@display} to be placed in the group footer:
whileprintingrecords;
numbervar sumext;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top