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
August 30, 2016, 10:23 PM
David Briars
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.
August 31, 2016, 06:27 AM
Wep5622
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 :
August 31, 2016, 08:11 AM
Martin vK
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
August 31, 2016, 08:53 AM
Francis Mariani
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
August 31, 2016, 10:29 AM
Francis Mariani
I don't dare touch any of the repetition here, but at 10:20, this thing worked.