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!

Dates

Status
Not open for further replies.

diannelight

Technical User
Feb 24, 2003
59
US
I have a formula that breaks the date down so that the user has the option of selecting the report to be run by day, 15, 30 or 60 minutes.
My problem is:
How do I get the report to group by what the user has selected? ie. I want my calls coming in to be grouped into 15 minute intervals.
Also, what I've noticed is that when I group by 15 minute intervals, the figures will show as 15 minute intervals, per day and per month.
I would like it to show 15 minute intervals over the whole reporting period eg. over 3 months.
Thanks for your help.
 
Your solution would be a combination of formulas and groupings w/sub-totals...but I'd ned more info to be helpful.

Can you provide some additonal info?

1.) What is the datasource (SQL, Oracle, etc.)?

2.) Are the calls logged as a single date/time field rather than two separate fields - one for date and another for time?

3.) How is the data presented, is it a cross-tab or a list?
 
Thank you for your reply.

I am using field definition files. The field name that I am using is a 'date' data type.
Datasource is SQL and the data is represented as a list.
I hope this is a bit more helpful.
 
A.) Start with a NUMERIC parameter "TimeSlot" that allows the user to choose one of 15, 30 or 60

B.) Then break your DateTime field into it HOUR and MINUTE slots using 2 formulas in the DETAIL

Hour ({TABLE.DateTime})

Minute ({TABLE.DateTime})

C.) Then create a formula to do the required BREAK in the DETAIL

IF {?TimeSlot} = 15 THEN
(If ({@Minute} <= 14) then 00 Else
If ({@Minute} >= 15 and {@Minute} <= 29) then 15 Else
If ({@Minute} >= 30 and {@Minute} <= 44) then 30 Else
If ({@Minute} >= 45 and {@Minute} <= 59) then 45 Else 0)
ELSE
IF {?TimeSlot} = 30 THEN
(If ({@Minute} <= 29) then 00 Else
If ({@Minute} >= 30 and {@Minute} <= 59) then 30 Else 0)
ELSE
IF {?TimeSlot} = 60 THEN 00

D.) Insert First group on the HOUR formula, then supress the group.

E.) Insert Second group on the BREAK formula, and add a COUNT of calls.

F.) Label the Second group with a formula for BREAK TIME

Time ({@Hour},{@Break} ,00 )

G.) Then supress the DETAIL and the First Group, so all you show is the BREAK group and COUNT.

It's not the prettiest thing in the world, but it will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top