When working with Microsoft SQL Server Report Services (SSRS) you sometimes you get the question if you can format a field based on it’s value.
Better known as conditional formatting.

Cond02

If the field has an expression, this means you ‘have to’ re write this expression in the property you want to add formatting to.

Cond03

Now this is not a big problem, but if the field expression is complex, it might be time consuming and you need to remember when you change the field expression (to also change the iif you used in the formatting expression)

Now we have the reference ReportItems that allows you to refer to a specific field (like TextBox..).

Cond04

By using this ReportItems reference in the condition, you can simply use the value of the current cell and don’t have to worry about changing the condition when the expression changes.

 

Leave a Reply

Your email address will not be published. Required fields are marked *