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

Totaling Subtotals 3

Status
Not open for further replies.

Wacki

Programmer
Oct 28, 2004
35
US
newbie question...
I am using CRv10.
I have a report that has 12 columns with a total for each column at the Group Footer. What I need to be able to do is place a Grand total of the totals in the same group footer. Can anyone show me how to do this.

Thanks in advance
 
You should be able to right click on each of the same fields you used to create the subtotals and insert a grand total, which will be inserted into the report footer
 
Create a formula and select the totals (they'l be listed as report fields) you've created using something like:

{#RT1} + {#RT2}+...etc

This assumes hat you used Running Totals, they'll be listed as Group field - sum of... otherwise.

-k
 
synapsevampire

I tried that, and received an error stating
"The field cannot be used becasue it must be evaluated later"

Any other suggestions?
 
wichitakid

I can't do that becasue I need a total of all the fields for a group total. The way you suggested seems like I would get a total for each field.
 
Sorry. Reading too fast again

Synapsevampire's formula should work... I have almost the exact formula that's working in my reports where I also use the results to calculate yearly percentage changes
 
Thanks Guys,

The problem I was having is that I had WhilePrintingRecords
at the top.

Most grateful. Thanks Again
 
One other thing you might consider

Why not create another running total, RTTOT, that encompases all 12 columns?

 
When you say a RTTot that encompasses all 12 columns how do you set this up to zero out when the group changes? I tried this and it only totals the last row if the detail section, not all the rows, What am I doing wrong?

For Development sake consider teh following are the fields I have:

fld1
fld2
fld3
fld4
fld5
fld6
fld7
fld8
fld9
fld10
fld11
fld12

My formula looks like :
NumberVar Total;
Total := Total +
fld1 + fld2 + fld3 + fld4 + fld5 + fld6 + fld7 +
fld8 + fld9 + fld10 + fld11 + fld12


This then gives me a total for all rows, not just the ones in the group.
 
If you have running totals set up for columns 1 through 12 in the following manner using the formula option and reset on group change and placed in both the detail and group footer

Note: I am assuming a rolling 12 months report with {table.field} as the field being summarized with type of summary of SUM

//#fld1 - Based on currentdate, this is last month
{table.date} in dateserial(year(currentdate),month(currentdate)-1,1)to_ dateserial(year(currentdate),month,1)

//#fld2 - Based on currentdate, this is current month - 2
{table.date} in dateserial(year(currentdate),month(currentdate)-2,1) to_ dateserial(year(currentdate),month(currentdate)-1,1)

...

//#fld12 last year from currentdate
{table.date} in dateserial(year(currentdate),month(currentdate)-12,1) to_ dateserial(year(currentdate),month(currentdate)-11,1)

The following running total has the same type summary will never be reset and placed in the report footer

//#fldtot
{table.date} in dateserial(year(currentdate),month(currentdate)-12,1) to_ dateserial(year(currentdate),month(currentdate),1)

That should do it.

-larry
 
I have been reading this thread and I have a question. I am trying to total specific data within a group.
ex. I have a group that is for service codes. There is about 15 -20 services codes with detail data and hours for each service code. I want to total only the hours for service code 100, 120 , 130 and 140. can I do that?
 
Just create another running total and expand the formula to look for the service code you need to total

//#fldsvccode
{table.date} in dateserial(year(currentdate),month(currentdate)-12,1) to_ dateserial(year(currentdate),month(currentdate),1) and {table.servicecode} in ["100","120","130","140"]
 
Hi

Have not been using Crystal for 2 plus years, so seem to have forgotten a lot!

I have inherited a report that details the discounts applied to sales orders in grouped by order source e.g. Mail, telephone, Web

CR 8.5

I have 4 groups:

Grp 1: Order Source (suppressed)
Grp 2: Discount Code (suppressed)
Grp 3: Order Date (suppressed)
Grp 4: Sales Order Number (header suppressed, footer visible)
Nothing in details

Report looks like this:

Sales Order # Gross Net Total Discount
Order Order Disc Value
Order
Order Source: Mail
5% Discount
123 10.00 7.50 9.50 0.50
etc
etc
etc

Total Disc Count All sums as running totals, summing
order value at group 4 and
resetting at group 2

I then have grand totals in the report footer which are running totals and all this works fine. I have also put averages in the report footer which details the number of %% discounts by mail, telephone, web, 10% discounts by mail, telephone, web etc etc.

I want to insert a total of the discounted order value per order source and discount amount as a grand total in the footer – I have tried a running total evaluating order_value with the formula

{SALES_HEADER.SALES_OFFICE}="MAIL" and {ADDITIONAL_CHARGE.CHARGE_CODE}="XDISC5"

and not resetting, but this is summing the order value for each line item on an order. Any idea how I can conditionally sum the order value as per group 4 with the conditions required for each occurrence.

Hope this is clear since it is a very long time since I have had to try and explain a crystal report!!!

Thanks for your help

A
 
Something you might want to check is when are the totals being reset/displayed. This is done, I believe in the group section dialog box, but not sure since it has been awhile since I have done this.

Hope this helps.

Wacki
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top