Focal Point
Problem with WebFOCUS Styling - not very cascading

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

July 31, 2013, 06:21 PM
Francis Mariani
Problem with WebFOCUS Styling - not very cascading
I don't know if WebFOCUS styling is supposed to cascade, but it doesn't work very well.

For example, why on earth do the two style commands below not work together?

COL1 is wide and the brwser wraps the cell contents, I want to turn wrap off, so I add TYPE=REPORT, COLUMN=COL1, WRAP=OFF, $.

I also want to colour the COL1 data based on a condition, so I add TYPE=DATA, COLUMN=COL1, COLOR=RGB(0 97 113), WHEN= BODYTYPE EQ 'SEDAN', $ When I add this, the WRAP no longer works. I know I can add WRAP=OFF in the TYPE=DATA command, but why do I need to?

TABLE FILE CAR
PRINT
COMPUTE COL1/A200 = MODEL | ' '| MODEL;
*

ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=9, BORDER=1, BORDER-COLOR=SILVER, $
TYPE=REPORT, COLUMN=COL1, WRAP=OFF, $
TYPE=DATA, COLUMN=COL1, COLOR=RGB(0 97 113), WHEN= BODYTYPE EQ 'SEDAN', $

ENDSTYLE
END


Thanks,


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 01, 2013, 02:05 AM
Dave
Yep, I've noticed too...


It uses 'CSS' to add the style, but isn't cascading itself.

Must say I have better experience with using WF ( with or without .sty file ) to just add CLASS-names (multiple if needed ) to different parts of the report and use a 'real' .css to take care of the styling.

e.g.
TYPE=DATA,
   CLASS=datastyle,
$
TYPE=TITLE,
CLASS=titlestyle,
$
TYPE=DATA,
COLUMN=COL1
CLASS=datastyle datahighlight,
$


CSS will apply both classes to the HTML-element when specified.

This might be something to work with,

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
August 01, 2013, 01:21 PM
Doug
Try changing "DATA" to "REPORT" in your "TYPE=DATA, COLUMN=COL1, COLOR=RGB(0 97 113), WHEN= BODYTYPE EQ 'SEDAN', $" line.

DATA Trumps REPORT when cascading.
August 01, 2013, 01:27 PM
Francis Mariani
Except that I don't what to affect the column title styling...


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 01, 2013, 05:09 PM
Doug
Does TITLE Trump REPORT (I think so)? If so, try adding "TYPE=TITLE, STYLE=NORMAL, $" after you "TYPE=REPORT, COLUMN=COL1, COLOR=RGB(0 97 113), WHEN= BODYTYPE EQ 'SEDAN', $" line.