Ok, LB, that doesn't seem to work either. To answer your first question in your last answer, yes, the business days calculation is working correctly. I have manually verified it across several tickets from different months (I'm only pulling the data from the LastFullMonth). The formula you offered above appears to be doing the same thing the Highlighting Expert was doing.
There doesn't appear to be a rounding issue as I even tried modifying the original business days formula to include 2 decimal places and the result is zeros for both decimal places. I then modified the formula you offered above as:
[blue]if currentfieldvalue < '6' then
crNoColor else
crRed[/blue]
Leaving the single parentheses out around the value 6 produces an error so I added them. I modified this both down to < '1' as well as flipped it around:
[blue]if currentfieldvalue > '5' then
crRed else
crNoColor[/blue]
but nothing seems to be working like it should. I'm not sure if it is because some of the values produces by the business day datediff are two digit numbers or what the issue is with highlighting. Any further help you can offer is greatly appreciated.
Here's the entire formula as used in my report:
[blue]
//Use the following formula, replacing the items in Bold with your start/end date and the items in Italics with your holidays........
WhilePrintingRecords;
//Set the values of Start Date and End Date
DateVar StartDate := Date({MV__ReportingView.Submit Date});
DateVar EndDate := Date({MV__ReportingView.Last Resolved Date});
//Find out the difference in days and subtract the weekends
NumberVar DaysDiff := DateDiff("d",StartDate,EndDate) -
DateDiff("ww",StartDate,EndDate,crsaturday) -
DateDiff("ww",StartDate,EndDate,crsunday);
//Create an array of Holiday dates
Local DateVar Array Holidays := MakeArray(
Date(2009,01,01),
Date(2009,01,19),
Date(2009,05,25),
Date(2009,09,07),
Date(2009,11,26),
Date(2009,11,27),
Date(2009,12,25));
//Loop through the array checking if each holiday is within the dates
Numbervar Counter := 0;
While UBound(Holidays) <> Counter do
(Counter := Counter + 1;
if Not(dayofweek(Holidays[Counter]) in [1,7]) and
Holidays[Counter] in StartDate to EndDate then DaysDiff := DaysDiff -1

;
//Display result to 0 decimal places and no thousand separator
totext(DaysDiff,0,"");
[/blue]