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

Crystal Reports Running Totals By Group

Status
Not open for further replies.

crdamsel

Programmer
Aug 7, 2013
33
US
What formula would I use for a group that has its own running total? Need a running total (3569+13=3582, 3582+17=3599, etc.) for each group (LAX, SFO, etc.) in this report as shown below so if you can tell me a formula to use or just a suggestion on what I could do, I would really, really appreciate it.

PAGE 1 PROJECTED INVENTORY 07-MAY-2013

ITEM YEAR LOC TOT INV
==== ===== === === ===
TANKS 2012 LAX 13 3569
TANKS 2012 SFO 24 308
-----------------
TOTAL 2012 --- 37

TANKS 2013 LAX 13 3582
-----------------
TOTAL 2013 --- 13

TANKS 2014 LAX 17 3599
-----------------
TOTAL 2014 --- 17
 
Right-click on the field, then choose Insert and Running Total.

The automatic process lets you create a running total at group level and for the same report.

You might find a Summary total better.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Madawc, thanks so much for your quick response but i've tried using Running Totals as well as Summary totals. Unfortunately, Crystal totals both groups together (see below). As i first stated, i need a running total (3569+13=3582, 3582+17=3599, etc.) for each group (LAX, SFO, etc.) so if SFO had its own TOT it would be added together.

PAGE 1 PROJECTED INVENTORY 07-MAY-2013

ITEM YEAR LOC TOT INV
==== ===== === === ===
TANKS 2012 LAX 13 3569
TANKS 2012 SFO 24 3593
-----------------
TOTAL 2012 --- 37

TANKS 2013 LAX 13 3906
-----------------
TOTAL 2013 --- 13

TANKS 2014 LAX 17 3623
-----------------
TOTAL 2014 --- 17
 
Unclear what you're after. Would a crosstab do it?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Madawc, i so much appreciate you responding to this however i need a running total (INV) for each group. For instance, the TOT amounts for LAX (3569+13=3582, 3582+17=3599, etc.)* would be added as a running total and the TOT amounts for SFO (308+19=327, 327+11=338, etc.)** would be added as a running total which i added a few more fields to this report for SFO hoping to make it easier to understand. No concern for the INV total of 3569 and 308. They are just previous calculations for TANKS LAX and TANKS SFO. Also, LAX and SFO change so they cannot be used hard-coded variables in a formula.

PAGE 1 PROJECTED INVENTORY 07-MAY-2013

ITEM YEAR LOC TOT INV
==== ===== === === ===
TANKS 2012 LAX 13 3569 *
TANKS 2012 SFO 24 308 **
-----------------
TOTAL 2012 --- 37

TANKS 2013 LAX 13 3582 *
TANKS 2013 SFO 19 327 **
-----------------
TOTAL 2013 --- 32

TANKS 2014 LAX 17 3599 *
TANKS 2014 SFO 11 338 **
-----------------
TOTAL 2014 --- 28

 
You can make Running Totals conditional. One of the options on the automatic generation function.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Madawc, how would i make these Running Totals conditional since the LOC fields such as LAX and SFO change so they cannot be used as hard-coded variables in a formula? Again, thanks for responding.
 
Sorry, I don't follow. Can anyone else help?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
This thread is closed. I received a solution from a very help CR consultant on the west coast in which he suggested i use an array for the calculations. His generosity and kindness like this is what creates productivity and prosperity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top