Tip: How to Print a CheckBox for a Boolean Column in Crystal Reports?

I have to display a CheckBox for a Boolean column in Crystal Reports. If the value of the column is true, the CheckBox should be checked, otherwise unchecked. Unfortunately, Crystal Reports does not provide a CheckBox control.

 

The workaround for this is:

 

Create a Formula with your column name and print Char(254) for true value and Char(168) for false value. Here is my formula look like:

 

If {Table.IsTeacher} = true then Chr(254) else Chr(168)

 

Now place the formula in your report designer and change font to Wingdings. You are all set.

 

This is amusing, how Business Objects folks (creator of crystal reports) can't just provide a control, which does the same. May be they will have in next version ;-)


Similar Articles
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.