SSRS CBool Function

The SSRS CBool function is a Conversion function that will convert the given field or expression to a boolean value. The syntax of the CBool function for converting flag to boolean True or False is as shown below.

=CBool(Fields!Flag.Value)

To demonstrate the CBool function in reporting services, we use the Employee table below, which has 20 records. The image shows the records in the Table report.

Source Table

SSRS CBool function Example

For this, let me add a new column to the right side of the HouseOwnerFlag column. Next, right-click the textbox under the CBool and choose the Expression to open the expression window shown below. The CBool expression below will convert the House Owner Flag column values to boolean True or False. Here, 1 will convert to True and 0 to False.

  1. More Functions
  2. Charts
  3. Tables
  4. Format tables
  5. SSRS
=CBool(Fields!HouseOwnerFlag.Value)
SSRS CBool Function expression to convert to boolean value

Please click the preview tab to see the report.

SSRS CBool Function to convert field to boolean True or False