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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check box 8

Status
Not open for further replies.

tmoor

Programmer
Aug 29, 2002
16
US
Hi all:
Is there a way to replace a tinyint field with a check box if 1?
Thanks - Crystal 8.5pro
Terry
 
Crystal doesn't have check boxes.

If you'd like to display something akin to that you'd have to do so with fonts or a graphic of one, in either case, you could conditionally display.

Perhaps you meant to post in a VB forum?

-k kai@informeddatadecisions.com
 
Hi k:
Thanks..Wasn't sure because I didn't find anything in manual.
Terry
 
Hi there,

if you are wanting a conditional checkbox on your report, here is a solution that should work for you.

1. Create the formula:

//Where "þ" is under the font Wingdings as ALT+0254 (a checked checkbox),
//and "¨" is under the font Wingdings as ALT+0168 (a blank checkbox).
if {file.field} = 1 then "þ" else "¨"

2. Insert this formula in the section where the checkboxes are required.

3. To get the correct font and character, go to Start | Programs | Accessories | Character Map
and switch the font to Wingdings.

4. Find the checkbox (ALT+0254), highlight and copy it, and then paste it into the formula. The same can be done for the empty checkbox character (ALT+0168).

Note: If the Character Map option is not available under Start | Programs | Accessories, then it was not loaded during the initial installation of Windows. The Character Map is loadable on all platforms of MS Windows, and can be loaded after with the Windows CD.

Simply go to Control Panel | Add/Remove Programs and select Windows Setup. The Character Map option is located under Accessories. Enable this option, select OK and restart your PC.

Hope this helps Eileen McEvoy
Crystal Reports Consultant and Trainer
emcevoy@crystalconsulting.ca
 
Hi all:
I ended up inserting a checkon.jpg and a checkoff.jpg suppressing it conditionally depending on whether report field is 0 or 1.
Thanks again
Terry
 
Dear All,

Just to add my two cents, you can also achieve using html formatting. Create formula as shown below, insert into report, right click, format/paragraph formatting and choose HTML.

Cut and paste and you will have it exactly:

//formula
if {Table.myfield} = 1
then &quot;<font face = wingdings> þ&quot;
else &quot;<font face = wingdings> o&quot;
//end formula

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks Rosemary...Haven't tried it yet but will.
Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top