Crystal Reports – How to display boolean true/false as checkbox

The steps below show how to display boolean true/false values as a checkbox with either a tick and/or cross.

By default these values are displayed as either ‘True’ or ‘False’.

  1. In the Field Explorer right-click on ‘Formula Fields’ and choose ‘New’
  2. Enter a name for the formula, e.g. tick_user_likes_fruit
  3. Add in the following formula (replace {Sheet1_.user_likes_fruit} for your field)
  4. if NOT ISNULL({Sheet1_.user_likes_fruit}) AND {Sheet1_.user_likes_fruit} then
    Chr(254)
    else
    Chr(253)
  5. Save and close the window
  6. Add the formula field to the report.
  7. Change the font for the field to Wingdings
  8. The field will now display ticks and crosses that correspond to the boolean value.

 

Similar characters

The following values may also be used

Symbol Name Value
Ballot X 251
Check mark 252
Ballot box with X 253
Ballot box with check mark 254

Related Articles

Leave a Reply

Your email address will not be published.