Print Page | Close Window

Sum Issues

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1703
Printed Date: 28 Apr 2024 at 5:36am


Topic: Sum Issues
Posted By: bwagner
Subject: Sum Issues
Date Posted: 16 Nov 2007 at 4:07pm

Well I'm having some issues getting Crystal to tell me what I want.  I work in a call center and I'm importing data regrading reps productivity, logged in time, calls handled, talk time etc.  Some of our reps are on more than one queue, and in our SQL server it stores their logged in time seperately for each queue.  For instance if the agent is on 1 queue, each half hour there will be 30 minutes of logged in time.  But if they are on 2 skillsets it reports with 60 minutes, 3 queue = 90 minutes, so on and so forth.

I have been able to correct this by summing their logged in time and dividing it by the distinct count of the queues they are on.  The problem is that I now need a total for their team.  I've tried each and every way I could think of to make this happen. 
 
I've tried running totals, but this only works at the agent level, so when it gets down to the team, it adds the true total with the value of the last agent.  I have also tried the same approach to the group as I did for the agents, but this wont work since many agents share skillsets.
 
Is there anyway I could make a sum of a sum.  Like make a summary of the agents at the foot of the team?
 
Any help would be greatly appreciated.



Replies:
Posted By: jkwrpc
Date Posted: 17 Nov 2007 at 8:07am
As I understand it you cannot use a Running Totals on summary fields. However, assuming that is true,  you should be able to create  a manual running total.
 
This is described a number of places including the CR Help file. Generally you create 3 formulas. Once in the header that is appropriate for your report and grouping situation. In that formula you create a variable of the appropriate type and set it to zero. You use the whileprintingrecords evaluation time in all three formulas.  Then you create a formula that will add the sums you want and finally add a formula to display the result. It would look something like this.
 
FormulaHeader:
WhilePrinting Records;
numbervar x := 0;
 
FormulaDetail:
WhilePrintingRecords;
numbervar x:
x := x + {SummaryField}
 
FormulaFooter:
WhilePrintingRecords;
numbervar x;
x;
 
Your layout might look something like this:
Group1 Header  -> FormulaHeader (Suppress)
 
Group2 Footer -> FormulaDetail (Suppress)
 
Group1Footer -> FormulaFooter
 
Hope this helps get you started on a solution.
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net


Posted By: bwagner
Date Posted: 20 Nov 2007 at 12:34pm
Wow John.  Must feel nice to be a genius.  Thank you so much for pointing me in the right direction, it's working!



Print Page | Close Window