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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Complex WebFOCUS styling not working

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Complex WebFOCUS styling not working
 Login/Join
 
Expert
posted
In reference to Styling not working for a specific heading in the report, I've spent the past four hours on styling a complex report and learnt that WebFOCUS styling is the dog's breakfast, left out in the rain for a week.

You definitely need illogically repetitious styling code to make something work.

I am stuck with something obvious, and obviously WebFOCUS cannot handle:

I have a subtotal background colour, based on WHEN condition #1.
I have a subtotal font colour, based on WHEN condition #2.

Never the twain shall meet - the background colour styling is ignored because of the font colour styling.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Can you try adding...?

subtotal background colour, based on WHEN condition #1.
subtotal background colour, when condition is *not* met.

subtotal font colour, based on WHEN condition #2.
subtotal font colour, based on WHEN condition #2 is *not* met.
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
Alternatively, you could create 4 style rules, one for every combination of your conditionals. Of course, for that you need to combine the conditionals into a single field for WHEN to grok what you mean...

DEFINE FILE GROKTHIS
    CONDITION1AND2/D3 = IF condition1 EQ 1 AND condition2 EQ 1 THEN 3
        ELSE IF condition2 EQ 1 THEN 2
        ELSE IF condition1 EQ 1 THEN 1
        ELSE 0;
END
TABLE FILE GROKTHIS
...
TYPE=SUBTOTAL, BGCOLOR='WHITE', COLOR='BLACK',$
TYPE=SUBTOTAL, BGCOLOR='RED', WHEN=CONDITION1AND2 EQ 1,$
TYPE=SUBTOTAL, COLOR='RED', WHEN=CONDITION1AND2 EQ 2,$
TYPE=SUBTOTAL, BGCOLOR='RED', COLOR='CYAN', WHEN=CONDITION1AND2 EQ 3,$


Of course that gets exponentially tedious with every extra condition you introduce.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
I have also spent endless hours in conditional styling. Sometimes it works to make 1 define for the different combinations of styling. Something like:
SUBTOTSTYLE/A10 = IF <condition #1> AND <condition #2> THEN '1yes2yes' ELSE
                  IF <condition #1> AND NOT <condition #2> THEN '1yes2no' ELSE  
                  IF NOT <condition #1> AND <condition #2> THEN '1no2yes' ELSE '1no2no'; 


And then in the styling section make 4 styling lines with both background colour and font colour and WHEN on the 4 SUBTOTSTYLE values.

Martin.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
 
Posts: 168 | Registered: March 29, 2013Report This Post
Expert
posted Hide Post
Friends, thanks for tips. I think I'll have to combine the four different scenarios in a computed condition, but it seems ridiculous to the extreme that colouring a background with one condition and colouring text with another condition cannot cascade properly.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I don't dare touch any of the repetition here, but at 10:20, this thing worked.

ON TABLE SET STYLE *

TYPE=REPORT, UNITS=PTS, GRID=OFF, FONT='Arial', SIZE=12, $
TYPE=REPORT, SUMMARY='Report for &DATE_DISP', TITLETEXT='Report for &DATE_DISP', $

TYPE=HEADING, SIZE=11, $
TYPE=HEADING, LINE=1, STYLE=BOLD, $

TYPE=FOOTING, SIZE=11, $

TYPE=SUBHEAD, BY=DIM1, HEADALIGN=BODY, STYLE=BOLD, JUSTIFY=RIGHT, BORDER=LIGHT, $
TYPE=SUBHEAD, BY=DIM1, LINE=1, COLOR=WHITE, BACKCOLOR=RGB (75 172 198), SIZE=12, COLSPAN=5, JUSTIFY=LEFT, $
TYPE=SUBHEAD, BY=DIM1, LINE=2, COLOR=BLACK, BACKCOLOR=WHITE, $

TYPE=SUBHEAD, BY=DIM3, STYLE=BOLD, COLOR=NAVY, BACKCOLOR=WHITE, $
TYPE=SUBHEAD, BY=DIM3, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $

TYPE=SUBHEAD, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, $

TYPE=SUBFOOT, BY=DIM1_TOT_LABEL, BORDER-TOP=MEDIUM, $

TYPE=SUBFOOT, BY=DIM2_TOT_LABEL, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, $

TYPE=SUBTOTAL, STYLE=BOLD, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, $
TYPE=SUBTOTAL, COLUMN=MEAS1, BORDER-LEFT=OFF, $
TYPE=SUBTOTAL, COLUMN=MEAS2, BORDER-LEFT=OFF, $
TYPE=SUBTOTAL, COLUMN=MEAS3, BORDER-LEFT=OFF, $

TYPE=SUBTOTAL, BY=DIM2_TOT_LABEL, STYLE=NORMAL, $

TYPE=SUBTOTAL, COLUMN=MEAS1, BORDER-LEFT=OFF, WHEN=MEAS1 GE 0, $
TYPE=SUBTOTAL, COLUMN=MEAS2, BORDER-LEFT=OFF, WHEN=MTDVALUE GE 0, $
TYPE=SUBTOTAL, COLUMN=MEAS3, BORDER-LEFT=OFF, WHEN=YTDVALUE GE 0, $

TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=DIM3 , BORDER-TOP=LIGHT, BACKCOLOR=RGB(253 233 217), WHEN=MEAS1 LT 0, $
TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=MEAS1, COLOR=RED, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, BACKCOLOR=RGB(253 233 217), WHEN=MEAS1 LT 0, $
TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=MEAS2, COLOR=RED, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, BACKCOLOR=RGB(253 233 217), WHEN=MEAS2 LT 0, $
TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=MEAS3, COLOR=RED, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BACKCOLOR=RGB(253 233 217), WHEN=YTDVALUE LT 0, $

TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=DIM3 , BORDER-TOP=LIGHT, BACKCOLOR=RGB(253 233 217), WHEN=MEAS1 GE 0, $
TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=MEAS1, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, BACKCOLOR=RGB(253 233 217), WHEN=MEAS1 GE 0, $
TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=MEAS2, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, BACKCOLOR=RGB(253 233 217), WHEN=MEAS2 GE 0, $
TYPE=SUBTOTAL, BY=DIM1_TOT_LABEL, COLUMN=MEAS3, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BACKCOLOR=RGB(253 233 217), WHEN=YTDVALUE GE 0, $

TYPE=SUBTOTAL, BY=DIM2_TOT_LABEL, COLUMN=MEAS1, COLOR=RED, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, WHEN=MEAS1 LT 0, $
TYPE=SUBTOTAL, BY=DIM2_TOT_LABEL, COLUMN=MEAS2, COLOR=RED, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, WHEN=MEAS2 LT 0, $
TYPE=SUBTOTAL, BY=DIM2_TOT_LABEL, COLUMN=MEAS3, COLOR=RED, BORDER-LEFT=OFF, WHEN=YTDVALUE LT 0, $

TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS1, COLOR=RED, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, WHEN=MEAS1 LT 0, $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS2, COLOR=RED, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, WHEN=MEAS2 LT 0, $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS3, COLOR=RED, BORDER-TOP=LIGHT, BORDER-LEFT=OFF, WHEN=YTDVALUE LT 0, $

TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=DIM3 , BORDER-TOP=LIGHT, WHEN=SHADE_3 EQ 'NO', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=DIM4 , BORDER-TOP=LIGHT, WHEN=SHADE_3 EQ 'NO', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS1, BORDER-TOP=LIGHT, WHEN=SHADE_3 EQ 'NO', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS2, BORDER-TOP=LIGHT, WHEN=SHADE_3 EQ 'NO', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS3, BORDER-TOP=LIGHT, WHEN=SHADE_3 EQ 'NO', $

TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=DIM3 , BORDER-TOP=LIGHT, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=DIM4 , BORDER-TOP=LIGHT, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS1, BORDER-TOP=LIGHT, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS2, BORDER-TOP=LIGHT, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $
TYPE=SUBTOTAL, BY=DIM3_TOT_LABEL, COLUMN=MEAS3, BORDER-TOP=LIGHT, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $

TYPE=DATA, WRAP=OFF, $
TYPE=DATA, BACKCOLOR=RGB(232 232 232), WHEN=SHADE_3 EQ 'YES', $

TYPE=DATA, COLUMN=MEAS1, COLOR=RED, WHEN=MEAS1 LT 0, $
TYPE=DATA, COLUMN=MEAS2, COLOR=RED, WHEN=MEAS2 LT 0, $
TYPE=DATA, COLUMN=MEAS3, COLOR=RED, WHEN=MEAS3 LT 0, $

TYPE=DATA, BACKCOLOR=RGB(253 233 217), WHEN=MIN.DIM1_SEQ EQ 1, $
TYPE=DATA, BACKCOLOR=RGB(253 233 217), WHEN=MIN.DIM1_SEQ EQ 2, $
TYPE=DATA, STYLE=BOLD, WHEN=MIN.DIM1_SEQ EQ 2, $

TYPE=DATA, COLUMN=DIM3, BORDER-LEFT=LIGHT, $
TYPE=DATA, COLUMN=YTDVALUE, BORDER-RIGHT=LIGHT, $

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
It seems like repeating styling for each column in the row resolves issues when two styles collide.

I had an issue where a negative number was not coloured red when a background colour was applied.

I replaced this:
TYPE=DATA, BACKCOLOR=RGB(232 232 232), WHEN=SHADING_IND3 EQ 'YES', $

by this:
TYPE=DATA, COLUMN=DIMENSION3, BACKCOLOR=RGB(232 232 232), WHEN=SHADING_IND3 EQ 'YES', $
TYPE=DATA, COLUMN=DIMENSION4, BACKCOLOR=RGB(232 232 232), WHEN=SHADING_IND3 EQ 'YES', $
TYPE=DATA, COLUMN=DAILYVALUE, BACKCOLOR=RGB(232 232 232), WHEN=SHADING_IND3 EQ 'YES', $
TYPE=DATA, COLUMN=MTDVALUE  , BACKCOLOR=RGB(232 232 232), WHEN=SHADING_IND3 EQ 'YES', $
TYPE=DATA, COLUMN=YTDVALUE  , BACKCOLOR=RGB(232 232 232), WHEN=SHADING_IND3 EQ 'YES', $

when there's this:
TYPE=DATA, COLUMN=DAILYVALUE, COLOR=RED, WHEN=DAILYVALUE LT 0, $
TYPE=DATA, COLUMN=MTDVALUE  , COLOR=RED, WHEN=MTDVALUE   LT 0, $
TYPE=DATA, COLUMN=YTDVALUE  , COLOR=RED, WHEN=YTDVALUE   LT 0, $


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     [CLOSED] Complex WebFOCUS styling not working

Copyright © 1996-2020 Information Builders