views:

749

answers:

2

I have a report with a lot of formulas that translate the word "TRUE" into an "X" and "FALSE" into a blank space.

I use these to put an "X" in a checkbox.

Sometimes there is text after my checkbox. To avoid slight shifts to the left and right, I print the "X" and the " " in a fixed width font. It is very tedious to manually set the font for each field.

Is there a way to specify a display font from inside the formula?

Something like this would be nice:

DisplayFontName = "Courier New";  //wishful thinking
DisplayFontSize = 8;  //wishful thinking

//this is the code I'm currently using
if Uppercase({table.somefield}) = "TRUE" then "X"
else " "
A: 

From what I remember, you can set the Font using formula field where you can write

if Uppercase({table.somefield}) = "TRUE" then "Courier New"

shahkalpesh
That simply prints the text "Courier New" on the report.Is there a way to assign this formula as the font for a block of text?
JosephStyons
+1  A: 

No, this is not possible. The context of a formula is the property for which the formula is set only. You cannot access properties of the whole object e.g. a field. Perhaps you could think about using two images suppressed by a formula depending on the value of your field. Then you would get rid of the font problem.

reallyinsane