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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Conditional style

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Conditional style
 Login/Join
 
Master
posted
Hai all

I am very new to WF. I am working on conditional styling. I am able to complete few of them but stuck at one point. Can someone suggest me how to do this.

  
TABLE FILE CAR
PRINT 
     SALES
BY COUNTRY
BY CAR
BY MODEL
END


Its like I want to color sales values green and red based on prior values. If current record sales values is more than sales value of prior record make it green else make it red. Something like this..Or one criteria I could think of is sales by years..say 2008, 2009 and 2010. If sales of 2009 is more than 2008, make it green or red and same with 2010 and 2009.

Thanks a lot..

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


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Platinum Member
posted Hide Post
DEFINE FILE CAR
FLG_SLS/A1 = IF SALES GT LAST SALES THEN 'G' 
ELSE IF SALES LT LAST SALES THEN 'R' ELSE 'X';
END
TABLE FILE CAR
PRINT 
     SALES  FLG_SLS
BY COUNTRY
BY CAR
BY MODEL
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=SALES,COLOR=RED,WHEN=FLG_SLS EQ 'R',$
TYPE=DATA,COLUMN=SALES,COLOR=GREEN,WHEN=FLG_SLS EQ 'G',$
ENDSTYLE
END
-EXIT  


You could tweak it to do what ever sum/sort you need to do and suppress the FLG field once you are satisfied with what its doing.


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
Master
posted Hide Post
thanks bluezone..its working great and I can make modifications as needed for me.
I will make flag as noprint..


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Conditional style

Copyright © 1996-2020 Information Builders