Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Font Color
 Login/Join
 
Platinum Member
posted
Hello,

How do I go about changing font color while doing and if statement. I have certain information that I want red and other information purple and then the rest black. I would like to do an if statement. If lateFlag = 'L' then color = 'purple'.

Thanks for the help in advance.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Platinum Member
posted Hide Post
I do this through the stylesheet. Have the default set as black and then add the following:

TYPE=DATA, COLOR=Purple, COLUMN=DIFF, WHEN=lateFlag eq 'L', $
TYPE=DATA, COLOR=Red, COLUMN=DIFF, WHEN=lateFlag eq 'X', $


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
Kelly,

Check out the conditional styling options available in the STYLESHEET. You can easily do this in the stylesheet using a conditional test (slightly different syntax than in the body of the report) and assign RGB colors to the lines.

Kevin


WF 7.6.10 / WIN-AIX
 
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005Report This Post
Expert
posted Hide Post
Kelly, check out the article on Focal Point's Focus on Developers called "What color is Indian Red, anyway?"




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Pam,

Here is the code that I used and it still doesn't work. I'm not getting an errors it just isn't turning the font to the different color.

Thanks for your help,
Kelly

ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLOR='PURPLE',
COLUMN=DIFF,
WHEN=lateFlag eq 'L',
$
TYPE=DATA,
COLOR='RED',
COLUMN=DIFF,
WHEN=lateFlag eq 'P',
$


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Platinum Member
posted Hide Post
try removing the quotes around the color. Let me know if that works.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Platinum Member
posted Hide Post
Kelly,

Where you have COLUMN=DIFF, replace DIFF with the name of your column.

Kevin


WF 7.6.10 / WIN-AIX
 
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005Report This Post
Platinum Member
posted Hide Post
Pam that still didn't work. I had it working a while ago with the code you gave me but I ended up change stuff in the overall report and now I can't get it to work again.

Thanks


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Gold member
posted Hide Post
We ref. the column:

WHEN = N1 EQ 1 ,


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
 
Posts: 77 | Location: Baltimore | Registered: May 31, 2006Report This Post
Platinum Member
posted Hide Post
Thanks everyone for your help but I still can't get it to work. Here is the code I have in there now.

TYPE=DATA,
COLUMN=N22,
COLOR='PURPLE',
WHEN=N22 EQ 'L',
$
TYPE=DATA,
COLUMN=N22,
COLOR='RED',
WHEN=N22 EQ 'P',
$


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Platinum Member
posted Hide Post
I got it.

Thanks everyone for your help. This is what I used:

TYPE=DATA,
COLOR='RED',
WHEN=N22 EQ 'P',
$
TYPE=DATA,
COLOR='PURPLE',
WHEN=N22 EQ 'L',
$


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
 
Posts: 121 | Registered: November 17, 2005Report This Post
Guru
posted Hide Post
Run this code and see if it works for you.

DEFINE FILE CAR
PROFIT/D12.2 = RETAIL_COST - DEALER_COST;
END
-*
SET BYDISPLAY = ON
-*
TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
PROFIT
BY COUNTRY
BY CAR
BY MODEL
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLOR='PURPLE',
COLUMN=PROFIT,
WHEN=PROFIT GE 5000,
$
TYPE=DATA,
COLOR='RED',
COLUMN=PROFIT,
WHEN=PROFIT LE 999,
$
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders