Print Page | Close Window

Conditionally change the font size

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6339
Printed Date: 06 May 2024 at 1:31am


Topic: Conditionally change the font size
Posted By: PRASAD SJ
Subject: Conditionally change the font size
Date Posted: 13 May 2009 at 3:57am
Dear friends,
 
How can I conditionally change the font size  programatically (by using a formula) based on a vatiable.
 
Thanks in advance,
 
prasad sj



Replies:
Posted By: DBlank
Date Posted: 13 May 2009 at 7:29am
For a text field you cannot do that. Yu can create multiple text fields with different font sizes  that overlay each other and then conditionally suppress them.
For most other field types you right click the field and select format field.
click on the Font tab.
Click on the formula button next to size and put your conditional formula there as "if condition then fontsize# else fontsize#"
Example: if {tbl.color}="red" then 10 else 8


Posted By: lockwelle
Date Posted: 14 May 2009 at 6:28am
DBlank, what I do for the text field, is since it is text, I create a formula, then I can programmatically alter the field.  Just thought I would offer the suggestion, instead of having multiple box with multiple suppressions.
 
Never occurred to me to use multiple text fields....hmm...



Print Page | Close Window