Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Overriding stylesheet styles
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Overriding stylesheet styles
 Login/Join
 
Virtuoso
posted
I'm having some trouble overriding some styles from my global WebFOCUS stylesheet. I want my DATA cells and the TITLE cells (in the preceding column) to have alternating background-colors, but WebFOCUS is ignoring my BACKCOLOR definitions...

My global company_stylesheet contains:
	UNITS=CM,
	PAGESIZE='SCREEN',
	SQUEEZE=ON,
	ORIENTATION=LANDSCAPE,
$ General page styles
TYPE=REPORT,		GRID=OFF,	CLASS=WFreport,	$ General report styles
TYPE=TITLE,			CLASS=TITLE		,$ Column title
TYPE=DATA,			CLASS=DATA		,$ Data cells


While my report contains:
ON TABLE SET HTMLCSS OFF
ON TABLE SET CSSURL '/approot/General/company_report.css'
ON TABLE SET STYLE *
     INCLUDE = company_stylesheet,
$
TYPE=DATA,
	CLASS=DATA,
	BACKCOLOR=(RGB(221 221 221) RGB(231 231 231)),
$
TYPE=TITLE,
	CLASS=TITLE noborder left,
$


I noticed that if I add conditions to the styles in my report I get back some control over them, but when I tried WHEN=SOMECOLUMN EQ SOMECOLUMN, I got the same style applied to every row, so apparently WebFOCUS isn't able to calculate row odd/even-ness under those circumstances?

What's the trick here?

Unrelated; I found a WebFOCUS Quick Reference Card for version 5.2, is there a newer version or is that still applicable? I searched the tech support section, but it didn't turn up anything relevant...

Regards.

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


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: 1649 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Silver Member
posted Hide Post
Can we see what is in this file?
'/approot/General/company_report.css'

I think we might need to see what's in your company_report.css, to better understand the issue.

Can you try this code, and see if it alternates, and has the conditional red background.

TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE SET HTMLCSS OFF
ON TABLE SET STYLE *
INCLUDE = company_stylesheet,
$
TYPE=DATA,
CLASS=DATA,
BACKCOLOR=(RGB(201 201 201) RGB(231 231 231)),
$
TYPE=TITLE,
CLASS=TITLE noborder left,
$
TYPE=DATA,COLUMN=SALES,BACKCOLOR=RED,WHEN=COUNTRY EQ 'ENGLAND',$
ENDSTYLE
END


WebFocus 7x, 8x, Win / Linux, any output format
 
Posts: 44 | Location: reading, pa | Registered: April 07, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Styles override previous styles... Try removing the "CLASS=DATA," line in:
TYPE=DATA,
	CLASS=DATA,
	BACKCOLOR=(RGB(221 221 221) RGB(231 231 231)),
$
as it seems to be the point of confusion here.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Doug:
Styles override previous styles... Try removing the "CLASS=DATA," line in:
TYPE=DATA,
	CLASS=DATA,
	BACKCOLOR=(RGB(221 221 221) RGB(231 231 231)),
$
as it seems to be the point of confusion here.


Yes, unfortunately they do... If you add conditional formatting you have to repeat your previous styling or it'll get lost. That kind of defeats the purpose of creating a company-wide stylesheet.
In fact, if I remove the CLASS=DATA from the above row, I get no CSS-class attributes in my table cells.

It's a bit of a pain that styles get overridden as soon as you need to add some extra style attributes, as we often have conditional styling (traffic-lighting certain columns or reports that need some reductions in size, for example). Having to repeat what's in the style-sheet is just extra work and thus extra risk of someone screwing up his or her layout. Is there anyone who considers that a feature?


On a positive note, I did find the cause of my issue; The trouble was caused by having ACROSS + OVER columns in the table. Because of those, the columns became rows and vice versa, so we had to use ACROSS=1..n (requiring n style definitions AFAIK) to apply the styling to the appropriate rows. Alternating backcolors apparently don't apply to such tables?

I'm of the opinion that the report styling stuff could use some work.


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: 1649 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Overriding stylesheet styles

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.