Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Am I am to add a checkbox? 4

Status
Not open for further replies.

ksbigfoot

Programmer
Joined
Apr 15, 2002
Messages
856
Location
CA
I have a field that is either 'Yes' or 'No' or '1' or '0'. I would like to have a checkbox with a check in it.
Are checkboxes available in Crystal Reports?
Thanks
 
You can create a fake check box with a formula:
//formula ckbox
If {table.field} = 1 then
"X" else " "

Place the formula where you want it and set it borders to a single line. Shrink the field size to the size you want the box. If there is a way to change the "X" to a check mark, I would like to know that as well.

MrBill
 
Hi,Even more fun try:
//chkbox
if {table.field} = '1' then chr(254) else chr(168)
Then format this field in your report to use the Windings font..
It will prodcue a checked or unchecked little box.

[profile]
 
Hi MrBill & Turkbear,
I will give that a try and let you know what I come up with.
Thanks again for your help.
p.s. I should read my titles before I post a question, opps :>
 
I am a little confused as I am new at this.
I created a formula and tried both of these lines:
Code:
if {v_ECL_LocalAuthorities.Emergency911} = '1' Then chr(254) else chr(168)
Code:
if {v_ECL_LocalAuthorities.Emergency911} = '1' OR {v_ECL_LocalAuthorities.Emergency911} = 'Yes' Then 'Happy' else 'Sad'
The field I dropped onto my report is not being updated.
Do I have a say something like {v_ECL_LocalAuthorities.Emergency911} = 'Yes'?
 
Hi MrBill & Turkbear,
Thanks again. I didn't drop the formula onto my report.
As soon as I did, it worked perfectly. Here is the code I used.
Thanks again, star to you.
Code:
If IsNull({v_ECL_LocalAuthorities.Emergency911}) Then
  chr(168)
Else
    If {v_ECL_LocalAuthorities.Emergency911} = '1' OR {v_ECL_LocalAuthorities.Emergency911} = 'Yes' Then
      chr(254)
    Else
      chr(168)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top