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!

Totalling Results of Group Summaries i

Status
Not open for further replies.

oanion

IS-IT--Management
Jun 18, 2004
55
I’m trying to create a portion of a report that will be grouped by the name of a server. (There is no set amount of servers. It can increase decrease depending on a date range in a selection statement). Each server has 3 categories for a summation. The summary I’m utilizing is the MAX function. For example, I want to see the Maximum number of minutes for a particular categorized call. In the example below, the numbers in the Category1 represent the Max number of minutes for each server for that particular category. My problem is, once I find the MAX number of minutes for each server, I’m not allowed to total all of the maximum results. The Total for Cateory1 is 1400. Is there a way to total a sum of summarized numbers in Crystal?

Category 1 Category2 Category 3
Server1 700 600 700
Server2 500 400 300
Server 3 300 200 100
ServerN 100 600 100

Totals 1400 1800 1200
 
A formula might do this, assuming that you're not using a crosstab here, but your math is odd, you say 1400 but it looks like 1600...

Try explaining this and how you're building this report.

-k


 
you are correct, I typed in the wrong total. As far as building the report, it is NOT a crosstab. I just grouped by the server name and created 3 formulas for each category. Each formula contained a formula that calculated returned the maximum value for the corresponding server group and category.
 
So in those formulas ctreate an additonal cariable to total them.

numbervar MyCat1Total := numbervar MyCat1Total+ <your current formula>

Then reference the above variable in a formula in the report footer.

-k
 
Ok, I tried this, and it is not calculating properly, here is the actual formula

The CurrentFormula is Maximum ({Cateory1}, {Server})

Then I created another formula called Cat1Total which consists of the following:

numbervar MyCat1Total := numbervar MyCat1Total+ {@CurrentFormula}

Then I placed the CAT1Total in the report footer.

The totals in the report footer are incorrect. Did I miss a step? Do you have any other ideas on how this can be accomplished?
 
I messed up part of the formula required, and you disregarded how I suggested that you do it, so no, it won't work.

I suggested that you add a variable to the existing formula, which you decided not to do, and then create another formula which is used fo display in the report footer, which would simply be:

whileprintingrecords;
numbervar MyCat1Total;
MyCat1Total

And the addition to your CURRENT formula should be:

numbervar MyCat1Total := MyCat1Total+ <your current formula result>

If you need assistance, post what's currently in your formula.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top