Create Conditional Formatting in Report Builder

Purpose: When you create long reports, this makes them easier to read

When you are receiving hundreds or thousands rows of data – your report quickly becomes hard to read. If you are unfortunate and need to read the data yourself, help yourself out with a basic trick. Create a conditional formatting for your report. SQL Report Builder’s conditional formatting is a nice additional touch to your reports and it just might make the report readable for someone else too.

Conditional format: highlight new computer

In this example, we will create a conditional formatting for a report, which lists workstations and additional details for each workstation. Because the report holds many rows for a single computer, each new workstation gets highlighted for easier reading.

Conditional format (1/3): select text box

First, you need to select the correct text box in your report. Select the text box, which presentation you would like to alter with a condition. In my example, the selected text box is the workstation netbios name.
 

Conditional format (2/3): select highlight effect

Second, as the actual highlight effect, I will fill the background color of the selected row. To do that select FILL and click on the function icon fx.
 

Conditional format (3/3): script it

Third, I wanted each new device to be highlighted in a different color: if the previous row value is different than the next, highlight it with LightSteelBlue else fill the row as white.

Expression
=IFF(Fields!Device_Name.Value<>Previous(Fields!Device_Name.Value), “LightSteelBlue”, “White”)

 

Finished

As a live example this conditional formatting would look like this (first row is a workstation netbios name, second row is an ID number we were interested in this example to get):
 

Leave a Reply

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


five − = one

Post Navigation