Skip to Content
Author's profile photo Former Member

How to display a Check Box and a Radio Button in Crystal Report 2011

Crystal Report does not have built in support to display a check box for Boolean operators or to display a radio button, but it can be achieved as explained below:

The simplest way to accomplish this task is to

1)      Edit  the display string of the value in Format Editor as shown below.

Figure 1: Format editor display string

FormatEditorToChangeDisplayString.jpg

2)      Set the font of the object to Wing Ding. 

First we need to add a formula to change the display text of the field. Right click on the field that we would like to change, and select “Format Field”. On the Common tab, click the “X+2” button for the “Display String” option and copy the formula as shown in figure

Ensure that “Crystal Syntax” is selected and write the formula content as shown in below screenshot:

Figure 2: Changing the display string

Formula Content.jpg

Click “Save and close”.

Now, change the font to “Wingdings” as shown in below screenshot.

Figure 3: Changing the Font to Wingdings:

Changing Font.jpg

Suppose we have data as shown below which shows whether an employee has opted for Medical, Dental and Basic Life coverage or not.

Figure 4: Data in Excel format:

Excel Output.jpg 

Now run the report. We get report output as shown below in figure 5.

Figure 5: Crystal Report output:

Report Output.jpg

In the above Crystal output we can see that check box is checked where we have “Yes” value in Excel data and check box is unchecked for “No” value.

P.S: To display a radio button we need to use chr(164) for selected radio button and chr(161) for unselected radio button with “Wingdings” font.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks, this is exactly what I was looking for and worked perfectly!

      Author's profile photo Former Member
      Former Member

      thank you
      thank you
      and thank you

      Author's profile photo Former Member
      Former Member

      Hello Prabhat

      I have requirement like i need to create 2 radio buttons excel and pdf format in a crystal report. So that an end user can see the report in whichever format he wants. Is there any option for this ? Can anyone help on this pleaseee?

       

      Thanks

       

      Author's profile photo 아 라
      아 라

      Hello,

       

      Is it possible to add radio buttons in the parameter window of a crystal report? Like the one in Inventory Counting.

      Thank you!