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

Crystal Report SUM OF SUM?

Status
Not open for further replies.

mcrisf

Programmer
Mar 2, 2005
31
US
Hi all
my problem with Crystal ReportX:
I do NOT want to use a CrossTab, because i have too many measures to include (MTD, YTD, % etc) and i need to have the difference beetween the grand totals (the crosstab doesnt let me to do that).
So i created 2 groups Products (1st group) and Sales Rep(2nd grp).All ok if i need to sum by Product, but Crystal doesnt let me to do the
sum(sum(amount, product), salesrep)
(sum of sum).I need to have the grandtotal of amount by sales rep over all products.
Someone can help me?THXXXXXXXXXX
Mcrisf
 
Your post doesn't make sense, the amount by product sum is the amount for each salesrep.

If you want the amount by salesrep, just use:

sum(amount,salesrep)

You say "I need to have the grandtotal of amount by sales rep over all products.", which doesn't make sense either, if they are by sales rep, then they are subtotals, right?

Posting example data and expected output is better than trying to describe what you want.

Obviously you can also just use sum(amount) for a grand total.

If you need soemthing special, use the 3 formula method:

group header:
whileprintingrecords
numbervar MyTot:=0

Inner group formula:
whileprintingrecords
numbervar MyTot:=MyTot+sum(amount,innergroupfield)

group footer display:
whileprintingrecords
numbervar MyTot

-k
 
You are really talking about looking at the data in two different ways, and if you don't want to use a crosstab, then you could insert a subreport. In the main report, insert a group on Products and insert summaries, and then insert a subreport in the report footer where you group on salesperson and insert the desired summaries for that there.

-LB
 
Sorry for the confusion...i try to be more clear....
my output should be:
columns:product1, Product2, P3 ect
rows:SalesRep1, SR2,..etc
measures:MTD, YTD, %, GoalsMTD, GoalsYTD, %
Totals:TotalByRows (ex. sum of MTD-P1, MTD-P2, MTD-P3 for the SR1), TotalByCol (ex. sum of MTD-SR1, MTD-SR2 for P1)
by i need also to have the possibility to subtract TotalByRow-TotalByCol (the cross table doesnt let me to do this)
how can to this with or without a cross table?
thx
mcrisf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top