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

Sum of group totals 1

Status
Not open for further replies.

dasiga222

IS-IT--Management
Sep 22, 2003
68
US
Hi

I am using crystal reports 10

I am having different groups in my report

I am taking report state wise of the sales data.
I have a field which is sales_amt

Each state is divided north direction, south direction
east and west direction

I take the sum of the sales direction wise
ie sum(sales_amt)... grouped by direction



Each state will have a northern direction sum, southern direction sum...western direction sum etc

Now after I get all the states sum.. I want to add up all the northern direction sums of all the states....
the southern direction sums of all the states....
the eastern direction sums of all the states....
the western direction sums of all the states....

How can I do that . Could some one suggest the remedy

Thanks
 
The simplest approach would be to insert running totals where you sum the amounts, evaluate using a formula:

{table.direction} = "East"

Reset never. Place this in the report footer. Repeat for each direction, changing the direction in the formula.

-LB
 
Hi Ibass

Thanks for your message
Infact I am looking for is slightly different

The grand direction totals need be done only after the indidual states direction totals are done

In my report , I need to show both the individual totals as well as the grand group totals

Again the directions are not fixed and cannot be hard coded

They can also be like North East..South west..South East..Clockwise .. etc ( any number of directions are possible)

I cannot take it granted always that it is N..S..W.. or East
They change constantly

Hence they are are grouped

Could you please suggest

Thanks
 
What is your formula for grouping the directions? Or is that your question? If that is your question, then you first need to determine the rules for what falls into each direction...

-LB
 
Hi

There are 8 types of directions

01 - north
02 - south
03 - east
04 - west
05 - southeast
06 - southwest
07 - northeast
08 - nothwest


The user may enter any directions of his choice

For that directions , he entered .. The sales amt are calculated in the individual states

Once all the individual states calcualtaions are made
the grand total for all the directions for all the states needs to be done

for exampple ..
we might calcualte north , east , south and west
sales of Alaska...California.. Iowa... Washington...etc

Now once all these individual states are done....they have to regrouped to know the grand direction total
I cannot do a grand running total because....

at each state level for the directions ... individual state tax is applied . Hence the inner group summation must be done

Then the sum of all these inner groups should be done to get a grand direction total .. Like

Total North Sum...
Total South sum...
etc

If I do running total.. then the individual states..Sales tax cannot be applied
Also the number of directions is not fixed
The user may enter 2 - 8 different directions

Could you please suggest

Thanks

 
I'm having trouble picturing your report design. Please show a sample layout showing your groups and what totals you want where.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top