Focal Point
[SOLVED] About Conditional Formatting

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9791087992

September 18, 2008, 02:56 PM
jgelona
[SOLVED] About Conditional Formatting
I have 5 fields in a heading line. By default, I want these fields to be bold and backcolor yellow. (This is HTML output). I do this with:
 TYPE=HEADING,
      LINE=9,
      OBJECT=FIELD,
      STYLE=BOLD,
      BACKCOLOR=YELLOW,
$

However, if the last field, is >= 2000, I want it to be bold, color yellow, backcolor red. I tried this:
 TYPE=HEADING,
      LINE=9,
      OBJECT=FIELD,
      ITEM=5,
      STYLE=BOLD,
      COLOR=YELLOW,
      BACKCOLOR=RED,
      WHEN=TB_BEG_BAL GE 2000,
$

I don't get an error, but it seems to ignore the WHEN clause. Can one use WHEN with Headings?

This message has been edited. Last edited by: Kerry,


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
September 18, 2008, 03:11 PM
Prarie
Try playing with the Item number...it may not really be 5.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I figured it out. As this report is a free-form report with nothing but heading, I just had a BY phrase that will be used for bursting. I had to add a SUM TB_BEG_BAL NOPRINT, then the formatting took. It appears that for WHEN to work, the field has to be part of a PRINT, SUM, COUNT, etc. command.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Also make sure the field you are using the the WHEN statement is included on your report. It can be there with a NOPRINT. It just needs to be there whether or not you show it as a column.

WHEN=TB_BEG_BAL GE 2000


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
You got it before I could post. Good job.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011