Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

setting color based on the condition

$
0
0

Hi All,

OrderYear   AvgTotalDue
----------- ---------------------
2001        10389.813
2002        10800.516
2003        4364.5113
2004        2307.8569

I want to set the back ground color for each year

OrderYear   AvgTotalDue
----------- ---------------------
2001        10389.813 - LightBlue
2002        10800.516- Green
2003        4364.5113- Orange
2004        2307.8569- Yellow

i can do it for a single cell using VB code like this below

Public Shared Function SetColor(ByVal OrderYear As Integer) As String
SetColor= "Transparent"
If OrderYear  = 2001 Then
SetColor= "LightBlue"
End IF
End Function

How about entire column.Can any body guide me how to go about



Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>