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

Conditional Formatting issue...looking for a clue...

Status
Not open for further replies.

kalebson

Programmer
Mar 3, 2006
60
US
Hey all..I have a Report that contains 2 SubReports. Within these SubReports there are 2 lists of numbers in % format using the following query expressions:

Report1:
Format$(IIf([SumOfAban Aft Thresh]=0,0,([SumOfAban Aft Thresh]/[SumOfCalls Offered])),'Percent') AS [Aban Rate1]

Report2:
Format$(IIf(Sum([Calls Ans])=0,0,((Sum([Calls Ans])-Sum([AnsAft Thresh]))/Sum([Calls Ans]))),'Percent') AS [Service Level1]

OK...These expressions are functioning and giving me the correct output. The output of these expressions is being populated into a text box in a report for each one.

Here is an output example:

Report1:
3.93%
4.64%
4.87%
6.42%
8.95%
28.63%
6.64%
8.81%
50.00%
0.00%
6.45%
1.58%
2.34%

Report2:
Service Level1
80.53%
78.34%
89.30%
72.35%
86.11%
78.35%
83.47%
82.01%
0.00%
0.00%
86.47%
72.77%
76.00%

Now the fun part is that I an setting the following Conditional Formatting to these Fields.

Report1:

If the Field Value is >= "25%" then change the Font to Red

Report2:

1. If the Field Value is < "70%" Font to Red.
2. If the Field Value is > "85%" Font to Bright Green.

So you say.. OK whats the problem?

Report 2 is FLAWLESS both formats work and the Values are ALL the right Color.

Report1 on the other hand does not work. When I set it to turn anything over 25% to red I get the following results in RED.

3.93%
4.64%
4.87%
6.42%
8.95%
28.63%
6.64%
8.81%
50.00%
6.45%

So they are all red except for
0.00%
1.58%
2.34%

I have tried multiple different formatting rules to no avail tried to do 2 different ones and still got the same results. Anyone have any idea at all why this one is not working the same way as the other? Any help would be great before I run out of hair.
 
You are comparing text strings, not numbers.
Get rid of the Format$ function in the query expressions to get numbers.
Apply the Percent format to the textbox.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top