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!

grouping sum issues 1

Status
Not open for further replies.

Delphin

Programmer
Nov 27, 2001
134
US
I am using cr10, connecting to SQL server.

I am getting the time from a call log to come in total number of seconds per call for the month.

I have 2 groups, 1 on the department, 1 on the agent. What I am tryin g to do is get the total number minutes and number of calls per agent for the day and for the month to date based on a user selecting a specific day.

I can calculate the total number of calls and total seconds via the summary for a single days worth of records, however when I want to bring in a whole month of data and still separate out the one day it is being a pain.

Example of imput data each number beng a separate call:

Agent 1

Day 1: 10 10 10 10 10
Day 2: 0
day 3: 20 10 20 20 10

Agent 2

Day 1: 10 10 10 10 10
Day 2: 30 20
day 3: 20 10 20 20 10

What I need is on day 3

Total calls/day Total time Cals/Month total time
Agent 1 5 80 10 130

Agent 2 5 80 12 180

How do I do a sum per day in the group agent?

Billy Ballard

For in the past, Lies the future.
 
Assuming you are already selecting the correct records for the month of the parameter date, I would use this approach:
// Formula SelectDateCount

If {table.date} = {?MyParamDate} then
1 else 0


//Formula SelectDateTime

If {table.date} = {?MyParamDate} then
{table.time} else 0

Place these formulas in your detail section along with the {table.date} and {table.time} fields.

Add a group for {table.date} if you want to display the totals for each day.

In the report footer Sum all four fields in the detail section. This should give you your total for your parameter date and your totals for month to date.

MrBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top