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!

Alter Font Size in Formula

Status
Not open for further replies.

diggers80

Programmer
Dec 3, 2002
4
SE
Could anyone tell me how to alter the font size of a field within a formula. ie if true then have a bigger font else font smaller.....

Any help / advice would be appreciated.
Cheers
 
Right click your formula, select Format, and next to Size you'll see the condition editor button (X+2).

Enter
Code:
If {@MyFormula} < 999 Then 10 Else 8
(or whatever your condition is supposed to be).

Naith
 
Naith,
Thanks for this, however there isn't an editor button next to Font Size. There is next to colour and using your principle i can get the colour to alter.

I'm using crystal reports V7.0.

Any other suggestions?

 
Ah, 7...

Well, my next trick would have to be HTML formatting. Apply
Code:
<font size = 1>
to your formula, but to be fair, I'm doubtful that this is 7 compliant.

Naith
 
Create either 2 identical sections or 2 copies of the field for which the font needs changing. Set one copy to one size, the other to the other size and conditionally supress them both depending on your formula. One will need to be supressed if the formula is true, the other if it is false.

A long way round but it works in version 7 just fine.
 
Cheers Mr 3legs...
This is how i ended up doing it.
Diggers !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top