countrymeister
asked on
How do I check /uncheck a checkbox on crystal report based on values set on the ASP page
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({?Volunteerprefere nceregion} ) >= 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
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({?Volunteerprefere
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know unless either Crystal or your printer doesn't support the extended character set.
mlmcc
mlmcc
I just found the answer. You need to use the WingDings font
http://kenhamady.com/cru/archives/92
mlmcc
http://kenhamady.com/cru/archives/92
mlmcc
ASKER
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