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!

Running Total By Group

Status
Not open for further replies.

dnagahawatte

Programmer
Jan 12, 2006
7
GB
I have a report that has many Client Groups and costs incurred by client group.
I have grouped this record by Client Group and now want a runnig total for each and every Client group.
I tried evaluate the running total by the Client_Group Field at change of field but does not work.
Can someone help please??
Example-----------
Jan
M&S
M&S1 - £100.00
M&S2 - £200.00
M&S3 - £400.00
--------------------------
- £700.00
-------------------------
TESCO
TES1- £100.00
TES2- £200.00
-------------------------
-£300.00
-------------------------
FEB
M&S
M&S1 - £400.00
M&S2 - £200.00
M&S3 - £700.00
--------------------------
- £Runnig Total M&S ??
-------------------------
TESCO
TES1- £500.00
TES2- £200.00
-------------------------
-£Runnig Total TESCO??
-------------------------
 
Your Running Total ought to include the option to clear for each group. Have you tried that?

It's also better to use a Summary Total whenever possible.

The use of Crystal's automated totals is outlined at FAQ767-6524.

It always helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.



[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Thanks you for ur response
I have a runnig total for each and every ClientGroup but resets at the change of client group. Which works fine for the "total of M&S for JAN" and "total of M&S for FEB" and so on. But i want is a runnig total of M&S not to reset at all
and a runnig total of Tesco not to reset at all...Seperatly.
So as you said clearning for each group does not help.
Also my version is "CR developer 11"
Anymore ideas ....
Thanks
 
You can either do a running total and in the evaluation section->use a formula:

{table.client} = "M&S"

->Reset Never, and then create a separate running total for TESCO. Or you could create conditional formulas:

if {table.client} = "M&S" then {table.cost}

Repeat for TESCO. Place these in the detail section and insert summaries on them at whatever level you like--group and/or grand total.

-LB
 
Thanks for ur reply, Ur solution is not practical only because i have more than 100 client groups on the database and not all of them appear on the report monthly, also these client groups getting added to the database on daily basis, so i cannt afford to change the report all the time.
Any other ideas??
I have changed the order of grouping for the moment seems the only way for now.
Ex-Client_group and then month.
But this is not how i exactly want it...
 
Do you really need a running total or do you just want the total year to date by client group? You could accomplish this by adding a crosstab to the report footer that uses client group as the column or row.

The crosstab could also be set up to show the cumulative amounts by month. You would add {table.client} as the column field, and {table.date}->group options->print on change of month as the row field. Add sum of amount as the summary. To make the results cumulative, do the following.

Select an inner cell->right click->format field->suppress->x+2 and enter:

whileprintingrecords;
currencyvar amt := amt + currentfieldvalue;
false

In the same screen->display string->x+2->enter:
whileprintingrecords;
currencyvar amt;
totext(amt,2);

Select the column total->right click->format field->suppress->x+2 and enter a reset formula:

whileprintingrecords;
currencyvar amt := 0;
false

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top