We help IT Professionals succeed at work.

New podcast episode! Our very own Community Manager, Rob Jurd, gives his insight on the value of an online community. Listen Now!

x

How do I check /uncheck a checkbox on crystal report based on values set on the ASP page

countrymeister
on
2,936 Views
Last Modified: 2008-01-09
I have a crystal report that gets populated based on values entered on an ASP form.
Crystal Report version 8.5
I need to display a checkbox on the report. So i ceated a formula field called checkVolunteer
I set the format of the field to Wingdings and set the formula as follows
if (length({?Volunteerpreferenceregion}) >= 1) then
Chr (254)
else Chr(111)

VolunteerPreference is the region the volunteer would like to volunteer, so if the user has entered some information in this field on the ASP form, I need to check the checkbox on the crystal report.

I also tried creating a regular parameter field with a border on all four sides, and then, setting the text value to 'X' or '', that does not work either.
I alos tried setting it in the ASP code to no avail

Could someone please post some sample code if they have done this before.
This is what I got from the Business Objects website
For example:

CHR(254) displays a check box with a check mark in the report and CHR(252) only displays the checkmark without the box in the report.

// CHR(254) - displays a box with a check mark

// CHR(253) - displays a box with an X

// CHR(111) - displays an empty box

// CHR(252) - displays a check mark only

// CHR(251) - displays an X only

Comment
Watch Question

Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
mlmcc
This works with an X fine, but why does the Chr(254) and Chr(111) does not work.
I will definitely award you the points, since your solution works, just would like to know from a learning point, why the Chr(254) does not work
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
I don't know unless either Crystal or your printer doesn't support the extended character set.

mlmcc
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
I just found the answer.  You need to use the WingDings font
http://kenhamady.com/cru/archives/92

mlmcc
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.