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     [CASE-NEVER-OPENED] Strange WebFOCUS styling issues
Go
New
Search
Notify
Tools
Reply
  
[CASE-NEVER-OPENED] Strange WebFOCUS styling issues
 Login/Join
 
Expert
posted
1) I would like to conditionally modify the font colour of data rows.

2) I also would like to set the column width of certain columns.

Doing these two in the same report is causing me problems:

1) The data row conditional colour does not work on columns where WRAP is specified - for both Excel and HTML.

2) Commenting-out the data row background colour makes the numeric columns left-justified - for HTML, the justification problem is not an issue in Excel.

-SET &ECHO=ALL;

-SET &WFFMT='HTML';
-*-SET &WFFMT='EXL2K';

SET PAGE=NOLEAD
SET HTMLCSS=ON
SET BYDISPLAY=ON

DEFINE FILE CAR
COL_FLAG/A1 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N';
END

TABLE FILE CAR
SUM
WARRANTY
STANDARD
HEIGHT    AS 'A LONG COLUMN TITLE FOR HEIGHT'
WEIGHT    AS 'A LONG COLUMN TITLE FOR WEIGHT'
LENGTH    AS 'A LONG COLUMN TITLE FOR LENGTH'
WIDTH
SALES
FUEL_CAP  AS 'FUEL CAP'
BHP       AS 'BRUTE HORSEPOWER'
COL_FLAG

BY COUNTRY AS 'COUNTRY'
BY CAR AS 'CAR'

ON TABLE SET STYLE *

TYPE=DATA, BACKCOLOR=(WHITE SILVER), $
TYPE=DATA, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $

TYPE=REPORT, COLUMN=COUNTRY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WARRANTY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=HEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=LENGTH, WRAP=80, $
ENDSTYLE

ON TABLE PCHOLD FORMAT &WFFMT
END

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, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Francis,
I think your TYPE=REPORT overrides your TYPE=DATA.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1936 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
This is the line that is causing the issue (I think) as it appears to be the last styling applied -
TYPE=DATA, BACKCOLOR=(WHITE SILVER), $

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5617 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
I guess WebFOCUS styling isn't cascading, though TYPE=DATA shouldn't override TYPE=REPORT. I've opened a case, will update here...


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, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I'm having an exact same situation here, TYPE=REPORT overriding TYPE=DATA, has something come up by now or is there a work around maybe?

Thanks,
SWES


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
 
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011Reply With QuoteReport This Post
Expert
posted Hide Post
It seems the only workaround is to repeat the styling for the columns where other styling is specified:

-SET &ECHO=ALL;

-SET &WFFMT='HTML';
-*-SET &WFFMT='EXL2K';

SET PAGE=NOLEAD
SET HTMLCSS=ON
SET BYDISPLAY=ON

DEFINE FILE CAR
COL_FLAG/A1 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N';
END

TABLE FILE CAR
SUM
WARRANTY
STANDARD
HEIGHT    AS 'A LONG COLUMN TITLE FOR HEIGHT'
WEIGHT    AS 'A LONG COLUMN TITLE FOR WEIGHT'
LENGTH    AS 'A LONG COLUMN TITLE FOR LENGTH'
WIDTH
SALES
FUEL_CAP  AS 'FUEL CAP'
BHP       AS 'BRUTE HORSEPOWER'
COL_FLAG

BY COUNTRY AS 'COUNTRY'
BY CAR AS 'CAR'

ON TABLE SET STYLE *

TYPE=DATA, BACKCOLOR=(WHITE SILVER), $
TYPE=DATA, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=COUNTRY, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=WARRANTY, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=HEIGHT, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=WEIGHT, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=LENGTH, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $

TYPE=REPORT, COLUMN=COUNTRY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WARRANTY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=HEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=LENGTH, WRAP=80, $
ENDSTYLE

ON TABLE PCHOLD FORMAT &WFFMT
END


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, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Got it Francis, but the only matter I have is that I need to wrap a column for a PDF output and can't figure how to combine it with specifying it twice?


 $
TYPE=REPORT,
     COLUMN=NAME,
	 WRAP=3.00000,
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$


This won't work:

 $
TYPE=DATA,
     COLUMN=NAME,
	 WRAP=3.00000,
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$


This won't work either:

 $
$
TYPE=REPORT,
     COLUMN=NAME,
	 WRAP=3.00000,
	 BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
$
TYPE=REPORT,
     COLUMN=NAME,
	 WRAP=3.00000,
	 BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
 
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011Reply With QuoteReport This Post
Master
posted Hide Post
SWES, what if you flip the order of your Style Commands. Since Style Sheets read top down and it seems that the TYPE=DATA command is removing your WRAP command maybe having the below will work better. Also why are you issuing TYPE=REPORT? I would just have used TYPE=DATA, and then if needed I would set my TYPE=HEADING for the specific column.

$

TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$

TYPE=REPORT,
     COLUMN=NAME,
	 WRAP=3.00000,
	 BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
$
TYPE=REPORT,
     COLUMN=NAME,
	 WRAP=3.00000,
	 BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,
$
  


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thank you for your reply Eric. Changing the order is what I tried before, what happens is that the WRAP command doesn't work anymore. What do you mean by changing to TYPE=HEADING?

 $
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$

TYPE=HEADING,
     COLUMN=CLIENTNAME,
	 WRAP=3.00000,
	 BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
$
TYPE=HEADING,
     COLUMN=CLIENTNAME,
	 WRAP=3.00000,
	 BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,
$ 


Like this?

Thanks,
SWES


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
 
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-NEVER-OPENED] Strange WebFOCUS styling issues

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