Chamark
12-28-2006, 09:24 AM
I am attempting to change the background color at the field level to create "at a glance" scorecard. If score is less than goal background should be red, if at or better than goal then background is green. Don't know where to insert (see code)....any help is really appreciated
<tr>
<td><span class="style12"><%=(AllSitesGOALS.Fields.Item("Segment").Value)%></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Adherence").Value), 2, -2, -2, -2) %></span></td>
<% If (AllSitesGOALS.Fields.Item("Adherence").Value) < (AllSitesGOALS.Fields.Item("Adherence Goal").Value)THEN
Response.Write "<bgcolor = ""Red"" >"
Else
Response.Write "<bgcolor = ""Green"" >"
End IF %>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Adherence Goal").Value), 0, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Adherence Variance").Value), 2, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Efficiency").Value), 2, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Efficiency Goal").Value), 0, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Efficicency Variance").Value), 2, -2, -2, -2) %></span></td>
<tr>
<td><span class="style12"><%=(AllSitesGOALS.Fields.Item("Segment").Value)%></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Adherence").Value), 2, -2, -2, -2) %></span></td>
<% If (AllSitesGOALS.Fields.Item("Adherence").Value) < (AllSitesGOALS.Fields.Item("Adherence Goal").Value)THEN
Response.Write "<bgcolor = ""Red"" >"
Else
Response.Write "<bgcolor = ""Green"" >"
End IF %>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Adherence Goal").Value), 0, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Adherence Variance").Value), 2, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Efficiency").Value), 2, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Efficiency Goal").Value), 0, -2, -2, -2) %></span></td>
<td><span class="style12"><%= FormatPercent((AllSitesGOALS.Fields.Item("Efficicency Variance").Value), 2, -2, -2, -2) %></span></td>