cancel
Showing results for 
Search instead for 
Did you mean: 

Converting True or False to a Check box

Former Member
0 Kudos

I'm trying to use the following formula to create a checkbox in Crystal

Stringvar Formula;

If not(isnull({@denied reason})) Then

//'Display the checkbox of your choice here'

Formula = Chr(254)

Else

//'Display empty checkbox'

Formula = Chr(168);

Chr(254) =True and Chr(168)=False then the formula is formatted to Wingdings to show checkboxes.

The problem I'm facing is, when I format the formula it gives me a bunch of other symbols along with the checkbox.

Could someone help with this issue.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use ChrW() instead Chr()!!

Answers (1)

Answers (1)

Former Member
0 Kudos

As Bryan says use chrw(), but also with Crystal Syntax you do not need Formula =

If not(isnull({@denied reason})) Then

//'Display the checkbox of your choice here'

Chrw(254)

Else

//'Display empty checkbox'

Chrw(168);

Former Member
0 Kudos

Thank you both for your help....

one more question.

The formula works fine where I want to get a check box but when I try to get vise versa(unchecked box)...the formula gives a quote symbol( ")

Formula name: Uncheck box

if not(isnull({@Formatted Reason})) then

Chrw(168)

There are a bunch of options listed in a letter, but I only want the first option checked and the rest be blank....

Tested ...

Chrw(251)

Chrw(252)

Chrw(253)

Chrw(254)

none of the above give the right symbol....

What am I doing wrong??

Thanks!!

Former Member
0 Kudos

Are you sure Wingdings gives a character for the ASCII character you have selected. Might need to use Courier.

Ian

Former Member
0 Kudos

I just tried with this and it seem to be working fine....

Chrw(2610)

Thank you for your help!!