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!

Conditional Bold text??? 1

Status
Not open for further replies.

jazerr

Programmer
Dec 13, 2000
152
US
Can I make text bold based on a parameter???
 
Thanks guys, I already tried the workaround on seagate's page, but the data I am using didn't allow it. Thanks though
 
Create a parameter (I tried it with a boolean parameter, but it should work for any type).
Right-click on the field and go to Format Field..., Font.
Click on the Conditional Formula button next to the Style dropdown and type:

if {?MyParameter} = true then
0 //regular
else
1 //bold

2 is for Italic and 3 is for Bold Italic.
Hope it'll help.
 
This didn't work, because its in a subreport. BTW I am using CR8
 
You CAN conditionally format to BOLD based on a parameter.

Please describe with more detail what you are trying to do.
Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
I have a report with 6 subreports. One of the subreports provides a list of Meeting participant's job titles, and their names. I am linking the subreport to the main based on a field called @Code. I need to conditionally bold the job title if it is equal to 4, 5, or 8. I am querying a MSSQL 2K database through multiple stored procedures. The only parameter I have set up is the @Code field. So the problem is:

Can I force crystal to //bold if {participantsSP.participant_title} = 4,5, or 8?


AND


What is the syntax???
 
Select the field.
Use menu options "Format Field"
Click on the Font TAB
Click on the 'pencil button' next to the Font Style attribute.

put in the following formula:


if {field} in [4,5,8]
then Bold
else Regular Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Right, thats what i said a while ago. I can't do this in a subreport. Only in the main report. In other words there is no 'pencil button'
 
There should be in V8.
Are there any pencil buttons on that window?
Was the subreport created in V7 by any chance?

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Okay, I see what I was doing wrong. I was combining 2 fields in a text field. I guess crystal doesn't like that too much...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top