Monday, January 9, 2012

Print a CheckBox / bullet for a Boolean Column

Within Crystal Reports, you simply cannot create a checkbox for Boolean operators.  WIth the use of a formula and the Wing Ding font, this task can be accomplished.   If a Boolean field is True or 1, then you can display a box with a check within it, else the box is left blank.

A Boolean field:

True or False

T or F

Yes Or No

Y or N

1 or 0

1. Create a Formula with your column name and type Char(254) for true value and Char(168) for false value.  Example:

If {Orders.Shipped} = True Then 
Chr(254) Else 
Chr(168);

2. Place the formula within your detail section and refresh (F5)

Results:

Checkbox

No comments:

Post a Comment