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

How to show boolean fields as checkboxes 2

Status
Not open for further replies.

ausmoran

MIS
Apr 8, 2001
157
US
IS there a way in crystal (version 9)to display the contents of boolean fields in a Crystal Report. Ideally, what I'd like to do is to "print" an unchecked checkbox when the field content is "no" and a checked checkbox when the field content is "yes."

I am totally a novice at this, so any highly detailed help you might be able to offer would be greatly appreciated.


Thanks in advance,
Austin
 
Dear Ausmoran,

Here you go, there are two options, and work in Crystal 8.0 - 9:

Option 1:

Create the following formula (copy exactly as it is and then change Table.Myfield to your field):

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

Insert into your report, right click, choose Format Field/Paragraph/Text Interpretation/Choose HTML

You now have empty check box and checked check box on report depending on condition.

Option 2:
If you prefer not to use html formatting you may accomplish the same with:

//formula
if {Table.Myfield} = 1
then &quot;þ&quot;
else &quot;o&quot;
//end formula

Insert field, right click/format field/font/Wingdings

It is the specific characters: &quot;þ&quot; and &quot;o&quot; that make this work. (just copy and paste - it was a pain getting them)

Note:

I prefer the html because if someone I write a report for gets a &quot;wild hair&quot; and changes the fonts on report it has no affect on the checkbox formula.
------

Enjoy!

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks so much, RoseMary for taking the time to respond to my question. Your response went a long way in simplifying what I'm sure would have otherwise been a daunting process.

I hope you don't mind my taking further advantage of your expertise???? I have twenty-some forms that have been saved as Microsoft Word documents. When I cope and paste them into Crystal 9, they are treated like graphic images, so I cannot insert database fields into the text. Is there a way to copy and past Word docs into Crystal and have it treated like text, thereby allowing me to insert database fields? This would save me an enormous amount of time.

Thanks again,
Austin Moran
 
Dear Ausmoran,

Hmmm, never having having needed to do this and just now getting into CR9 I am not sure that I am your best resource, however the options that come to mind are:

Inserting the word doc as a graphic image and then choosing underlay to place the Word doc in the background and then you would place your fields on top in the correct area is one idea.

The other option is to cut and paste from the documents into text objects. A tedious and daunting sounding task with 30 forms.

It might assist for you to describe the forms...could they be easily recreated in Crystal do the text fields areas you want to insert into remaim static or do they grow/shrink in size?

Also, might going the other way be the answer. While I haven't investigated - I understand that Crystal 9 and Word XP support smart tags (little links between reports and Word) that might also be an option.

Answer some of these questions for me and I will see what percolates...

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top