How to Highlight Table Rows Using Parameters
In Bold Reports, highlighting table rows based on a selected parameter improves report readability and helps users focus on specific data points during presentations. By using report parameters combined with expressions, you can conditionally apply styles such as background color to rows at runtime. This approach enables interactive and user-driven highlighting, improving readability and making data analysis more intuitive.This guide explains how to use conditional expressions to apply background colors to rows that match a user-selected parameter.
Step-by-Step Instructions
Step 1: Create a Report Parameter
- In the Bold Reports Designer, navigate to the Parameters pane and click New Parameter.
- Configure the parameter values by selecting the Assign Values option. Under Available Values, choose the appropriate data source and select the required Value and Label fields.
Step 2: Configure the Background Color Expression
-
Select the Details Row in the table where you want to apply the highlighting. In the Properties panel, locate the Appearance section.
-
Click the Expression icon next to the Background Color property.
-
Enter the following conditional expression in the dialog box and click OK:
=IIf(Fields!FieldName.Value = Parameters!ParameterName.Value, "HighlightColor", "Transparent")Expression Breakdown:
Expression Component Description Fields!FieldName.ValueRepresents the dataset field used for comparison. Parameters!ParameterName.ValueRepresents the parameter value selected by the user. "HighlightColor"Specifies the highlight color to apply (for example, “Yellow” or “#FFFF00”). "Transparent"Applies the default background color to non-matching rows.
Step 3: Preview the Result
- Switch to Preview mode and select a value from the parameter dropdown list.
- The table updates automatically and highlights the row that matches the selected parameter value.
Sample Report: You can explore a sample report demonstrating this functionality here.