Articles in this section
Category / Section

Apply Conditional Background Colors in Bold Reports

Published:
Updated:

Dynamically adjusting the background color of a tablix enhances data visualization by highlighting key metrics, such as flagging underperforming regions or emphasizing values that exceed thresholds.
For example, a sales report might use red for sales below target and green for those above, improving readability and insight.

Steps to Apply Conditional Background Colors

Step 1: Access the Background Color Expression

  1. In Bold Reports Designer, select the textbox within the matrix report tablix where you want to apply conditional coloring.
  2. Open the Properties panel by clicking the Settings icon.
  3. Locate the Background Color property under the Appearance category.
  4. Click the expression box (small square) next to the Background Color property to open the Expression Editor.
    image.png

Step 2: Define the Conditional Expression

  1. In the Expression editor, enter an expression to set the background color based on your condition. Use the following syntax:

    =IIF(Fields!YourFieldValue.Value > Value, "Color1", "Color2")
    

    Expression Components:

    Component Description
    IIF Evaluates a condition and returns one of two values: valueIfTrue or valueIfFalse. Syntax: =IIF(condition, valueIfTrue, valueIfFalse).
    Fields!YourFieldValue.Value References a specific field (column) in the dataset, retrieving its value for the current row.
    Value A constant (e.g., 1000), parameter, or another field to compare against YourFieldValue.
    "Color1", "Color2" Color names (e.g., "Red", "Green") or hex codes (e.g., "#FF0000", "#00FF00") returned based on the condition.

    Example:

    =IIF(Fields!Sales.Value > 10000, "#fee18a", "white")
    
  2. Replace YourFieldValue with the actual dataset field name and adjust Value, Color1, and Color2 to match your requirements.

  3. Click OK to save the expression.

    image.png

Step 3: Preview the Report

  1. Click the Preview button in the Bold Reports Designer to view the report.
  2. Verify that the background colors are applied correctly based on the defined conditions.
    image.png

Conclusion

Using conditional expressions to set background colors in a matrix report tablix helps create intuitive and visually impactful reports. By applying colors based on specific thresholds or criteria, you can highlight critical data trends and make interpretation easier.

Download the sample report for further reference.

See Also

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied