• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2239
  • Last Modified:

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({?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

0
countrymeister
Asked:
countrymeister
  • 3
1 Solution
 
mlmccCommented:
Create a formula


if (length({?Volunteerpreferenceregion}) >= 1) then
  "X"
else
  " "

Put the formula on the report with an appropriate label
Format the field with the borders

mlmcc
0
 
countrymeisterAuthor 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
0
 
mlmccCommented:
I don't know unless either Crystal or your printer doesn't support the extended character set.

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

mlmcc
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now