SQL Reporting Services Tips  

Main | About us | Contact us  

 

1) Embedded Code for cell colouring (conditional formatting)

Bring up the Report Properties (by right clicking outside the report in Layout view)

Now go to the Code tab and write in this code:

Function GetColour(ByVal Amount As Double) As String

 

If Amount < 5000000 Then

          GetColour = "Red"

ElseIf Amount >= 5000000 And Amount < 7500000 Then

          GetColour = "Orange"

Else

          GetColour = "Green"

End If

 

Return GetColour

 

End Function

Now Insert either of these formula into the Cells Colour Format

=Code.GetColour(Fields!TotalDue.Value)

=Code.GetColour(Me.Value)

 


 

Helpful? Try the web

© Copyright 2009. Reporting Services Tips.