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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining conditional formatting commands ??? 2

Status
Not open for further replies.

jschya

Programmer
Aug 20, 2002
18
DE
hi,
while there's no problem with the conditional formatting of e.g. numerical fields

if {field_1} = 0 the crBold else crRegular

and regarding the fontsize

if {field_1} = 0 then 12 else 10

if I use the Format>Field>Font>Style
and Format>Field>Font>Size

Formula Editor boxes, I didn't found a way to combine both statements.

Easy spoken: If field_1 has a value of zero, display the field in bold and with a font size of 12 points:

if {field_1} = 0 then crBold and fontsize = 12
else crRegular and fontsize 10

I couldn't find a way yet to enter a "combined" formula like that - btw just an example.

any hint is appreciated
joe
 
You need to write separate formulas for this. They have separate conditional formatting options. Have you tried this and is it not working?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
hi,
thx for your answer. I've made two formulas for the conditional formatting of the font's style and size - it's working - even enhanced by different colors - a third formula.

My questions was if it's possible to replace these two, three etc. formulas by ONE combined formula, to minimize the effort in editing and maintenance of the formulas.

my apologies for the clumpsy description of the problem.
joe
 
No, it is not possible to do this.

If you look at the top of the formula editor window when you are writing these types of formulas, it even tells you what you are working on. "Font_color" is one example, so by definition you can never change font size from this formula.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Joe,

If your field is a string formula, you can combine these formulae by forcing HTML formatting. You accomplish this by right clicking the field, and selecting Format/Paragraph Formatting/Text Interpretation: HTML.

Then, your formula follows a convention like:

If X = criteria
Then &quot;<Font Face = WingDings> <Font Size = 1>&quot; +
&quot;My Text Here&quot;
Else &quot;<Font Face = Arial> <Font Size = 2>&quot; +
&quot;My Other Text Here&quot;

However, you can't do this to a numerical field unless you convert the datatype.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top