# Conditional Formatting Overview

Conditional formatting allows you to style report items dynamically based on certain rules that are defined in the [Conditional Formatting Rules Dialog](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/tools/conditional-formatting-rules-dialog). All of this can be done without writing any code. Conditional formatting applies to any report item including sections and the report itself, all using the same [Conditional Formatting Rules Dialog](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/tools/conditional-formatting-rules-dialog) user interface. See also the [Extending the Simple Report Design Quickstart](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/tools/report-wizards/band-report-wizard/how-to-extend-a-band-report) Quickstart for a walkthrough demonstration of the conditional formatting feature.

## Usages

* Setting a specific color based on a value or other condition;
* Setting a specific text styling based on a value or other condition;
* Setting the visibility of an item based on a value or other condition and a lot more.

## Adding Conditional Formatting Rules

The **ConditionalFormatting** property contains a collection of formatting rules that are evaluated in the order they are defined. Each rule has an associated style that lets you change styling characteristics when the rule is satisfied. You can choose to stop evaluating rules if a particular rule condition is met.

Each filter condition is made up of an **Expression**, **Operator** and **Value**.

* **Expression** can be a data field from the **Fields** collection or defined using the [Edit Expression Dialog](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/tools/edit-expression-dialog).
* **Operator** can be simple comparison operators but can also include **Like** and additional operators to include the top and bottom number of records and the top and bottom percentage of records. See the table of operators below.
* **Value** can be a literal value, `<blank>` or an expression defined in the [Edit Expression Dialog](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/tools/edit-expression-dialog). When all the filter conditions are met, the rule is fired and the style is applied.

  ![Image showing the Formatting Rule editor window](https://www.telerik.com/products/reporting/documentation/assets/f0725e8634f187d06e344b17e0395e6d/style4.png)

You can change the Text, Background, Edges and Line Style for the given item using the [Style Builder dialog](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/tools/style-builder-dialog).

![Image showing the Style Builder window](https://www.telerik.com/products/reporting/documentation/assets/5c9dd965968be89380ba42df97ba94b3/style5.png)

## Samples with Conditional Formatting

* [Display Reports with alternating style rows](https://www.telerik.com/products/reporting/documentation/knowledge-base/how-to-display-alternating-style-rows)
* [Change row color based on a value in the row](https://www.telerik.com/products/reporting/documentation/knowledge-base/change-row-color-based-on-value)
* [Display "No Data" message for Reports and Subreports](https://www.telerik.com/products/reporting/documentation/knowledge-base/how-to-display-no-data-message-for-reports-and-subreports)
* [How to create waterfall chart with Graph item](https://www.telerik.com/products/reporting/documentation/knowledge-base/how-to-create-waterfall-chart-using-graph)
