Can I force the display font inside a Crystal Reports formula?

I have a report with many formulas that translate the word "TRUE" to "X" and "FALSE" to blank space.

I use them to set "X" in the box.

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

Is it possible to specify the display font 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 " "

      

0


source to share


2 answers


No, It is Immpossible. A formula context is a property for which a formula is specified only. You cannot access the properties of the whole object, eg. field. Perhaps you could consider using two images suppressed by the formula depending on the value of your field. Then you get rid of the font problem.



+1


source


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



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

0


source







All Articles