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

Technical Call logs older than 3 working days 2

Status
Not open for further replies.

Tabingz

Technical User
May 23, 2005
11
0
0
GB
Hi to everyone. My name is Thomas

This is my first post and I am not a Crystal expert.

I work for a IT company and have to work the support help desk during the the week.

If a call goes on over 3 days it has be highlighted. I have written a Crystal report to display calls open older than 3 days. The trouble with this is it includes the weekends.

I need a way of displaying calls older than three working days.

I have searched these forums and the web but can't get my head around the method to achive this.

Please help.
 
Why are you taking away business days for the log date ? To look at how many are more than 3 working days old shouldn't you be adding and then seeing if that value is before Currentdate ?
 
I'm a little confused.

All i want is a list of technical calls older than 3 working days (monday thru to friday)

 
Wow. I'm pretty confused myself. Let's just start again, why don't we?

Right click your date field, hit Format option, and then the Font tab. Click the Colour x+2 button.

Paste the following:
Code:
WhileReadingRecords;
Local DateVar Start := {Arrival.Date};   
Local DateVar End := CurrentDate;  
Local NumberVar Weeks; 
Local NumberVar Days; 
Local Numbervar Hol;
DateVar Array Holidays;

Weeks:= (Truncate (End - dayofWeek(End) + 1 
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 + 
(if DayOfWeek(Start) = 1 then -1 else 0)  + 
(if DayOfWeek(End) = 7 then -1 else 0);   

Local NumberVar i;
For i := 1 to Count (Holidays)
do (if Holidays[i] in start to end then Hol:=Hol+1 );

If Weeks + Days > 3 then CrRed
Else CrBlack;
This is based on Ken Hamady's formula from his website, where I see you were originally pointed to. To be honest, I kind of lost track as to what the hell was going on after that.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top