SSRS Conditional Changing Text Color

To make the contents of a text box render negative values in red for a field called Profit, open the Properties pane and use the following expression in the Color property:

=IIF(Fields!Profit.Value < 0, “Red”, “Black”)

To alternate the background color for every other row in a table, you can set the BackgroundColor property for each text box in the row to the same conditional expression. This technique works for detail rows only in a table with no groups.

=IIF(RowNumber(Nothing) MOD 2, “PaleGreen”, “White”)

Reff: http://msdn.microsoft.com/en-us/library/ms156400%28v=sql.100%29.aspx

Or for details look at this reff: http://blogs.msdn.com/b/davidlean/archive/2009/02/17/sql-reporting-how-to-conditional-color-1-4-the-basics-report-expressions-custom-code.aspx

Advertisements
By simplemsexchange Posted in SSRS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s