Conditionally Change a Control’s Appearance


Drop the required fields from the Field List onto the report’s Detail band.


Select the report by clicking anywhere over the blank area around its bands, and in the Property Grid, locate the Formatting Rules Sheet property and click its ellipsis button.

The invoked Formatting Rule Sheet Editor is intended to manage and customize formatting rules, which then can be defined for the report’s bands and controls.

In this dialog, create a new formatting rule (by using the button), locate its Condition property and, again, click its ellipsis button.


In the invoked Condition Editor, define the required Boolean condition. In this tutorial, we will format fields if the UnitPrice value is greater than 30.

To save the condition and close the dialog, click OK.


Now, back in the Formatting Rule Sheet Editor, define the formatting to be applied (e.g. specify the desired font color).

To save the changes and quit the dialog, click Close.


Select the band or control to which the formatting rule must be applied (in this example it is the Detail band), and in the Property Grid, locate its Formatting Rules property and click its ellipsis button.



If multiple rules are applied, it is possible to customize their precedence, by using the up and down arrow buttons at the right of the dialog.

So, the rules are applied in the same order that they appear in the list, and the last rule in the list has the highest priority.