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     [CASE-NEVER-OPENED] Strange WebFOCUS styling issues

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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, 2005Report 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: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report 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.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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, 2005Report 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, 2011Report 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, 2005Report 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, 2011Report 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, 2013Report 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, 2011Report 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     [CASE-NEVER-OPENED] Strange WebFOCUS styling issues

Copyright © 1996-2020 Information Builders