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     [SOLVED]Styling not working for a specific heading in the report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Styling not working for a specific heading in the report
 Login/Join
 
Guru
posted
Hi,

I have the below code using Car file and the color coding is not working for only 1 heading once I start adding the stylesheet to the data section.

Only when I comment the stylesheet section of the data part,Iam getting gray as the background color for the heading - >80%(which is required and is working fine as expected) and later once I start adding the data section stylesheet,the heading for >80% is not working and the background color becomes white and further,once I start adding the additional sections of stylesheet to the data,the font size of the heading >80% increases and the background color would be still white.

This is the code which Iam using.
 -SET &ECHO = ON ;
SET ASNAMES=ON

DEFINE FILE CAR
FIRST_HEAD1/A20='First';
SECOND_HEAD2/A10='Period';
A/A3='';
THIRD_HEAD3/A50='1st Target = Under 10% >80% (1st Std Only)';
HEAD1/A15='>35%';
HEAD2/A15='>60%';
HEAD3/A15='>80%';
END

TABLE FILE CAR
PRINT RPM NOPRINT
COUNTRY CAR MODEL BODYTYPE SEATS DEALER_COST RETAIL_COST SALES LENGTH WIDTH HEIGHT WEIGHT WHEELBASE FUEL_CAP BHP 
HEADING
"Standard Report"
"SOURCE:DATA"
"Data Current as of Today"
" "
"<A<FIRST_HEAD1<SECOND_HEAD2<A<THIRD_HEAD3"
"<A<HEAD1<HEAD2<HEAD3"
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,SQUEEZE=ON,FONT='ARIAL',SIZE=8,GRID=ON,BORDER=1.5,$
TYPE=HEADING,HEADALIGN=BODY,$
TYPE=HEADING,LINE=1,JUSTIFY=CENTER,COLSPAN=15,COLOR='BLACK',FONT='ARIAL',SIZE=14,STYLE=BOLD,$
TYPE=HEADING,LINE=2,JUSTIFY=CENTER,COLSPAN=15,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD+ITALIC,$
TYPE=HEADING,LINE=3,JUSTIFY=CENTER,COLSPAN=15,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD+ITALIC,$
TYPE=HEADING,LINE=4,ITEM=1,COLOR='BLACK',$
TYPE=HEADING,LINE=5,ITEM=1,COLSPAN=2,COLOR='BLACK',$
TYPE=HEADING,LINE=5,ITEM=2,COLSPAN=1,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=5,ITEM=3,COLSPAN=1,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=5,ITEM=4,COLSPAN=6,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD,$
TYPE=HEADING,LINE=5,ITEM=5,COLSPAN=5,JUSTIFY=CENTER,COLOR=RGB(153 0 0),FONT='ARIAL',SIZE=8,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=1,COLSPAN=2,COLOR='BLACK',$
TYPE=HEADING,LINE=6,ITEM=2,COLSPAN=4,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=3,COLSPAN=4,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=4,COLSPAN=5,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=8,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$

TYPE=TITLE,FONT='ARIAL',SIZE=8,STYLE=BOLD,COLOR='BLACK',JUSTIFY=CENTER,BORDER=ON,BACKCOLOR=RGB(169 169 169),$

-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,COLUMN=N2,BORDER=ON,JUSTIFY=LEFT,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,COLUMN=N3,BORDER=ON,JUSTIFY=LEFT,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N4,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N5,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N6,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N7,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N8,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N9,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N10,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N11,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N12,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N13,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N14,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N15,BORDER=ON,$
-*TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,JUSTIFY=CENTER,COLUMN=N16,BORDER=ON,$
ENDSTYLE
END
-RUN
-EXIT


 


Can anyone please let me know why the color coding is not getting applied to the specific heading alone when I start adding the stylesheet for the data section.

Any help is greatly appreciated.

Thanks a lot in advance!

Regards,
IP

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
It works with HTMLCSS OFF. It looks like the CSS rules are not generated correctly.

Seeing that you're using < and/or > in your output, for valid HTML you should at least add SET HTMLENCODE ON.

It's possible that the result fixes itself if you don't make your stylesheet so complicated by repeating the same styles over and over (which is hard to maintain as well).


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: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Guru
posted Hide Post
Hi Wep5622,


Thank you but this is not what Iam looking for. Frowner
If I turn off HTMLCSS, then I wont be getting the borders as black and all other things like headings in the 1st line are not working as expected.

I need to repeat the same styles over and over again in order to meet the requirement.

Any other solutions please?

Thanks,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
Did you try my other suggestions?


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: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Guru
posted Hide Post
Hi Wep5622,

Yes I tried all your options.
But I need the black borders.

Please let me know how to get this done. Thanks a lot!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
What Wep suggests is good advice.

Limit the styling (if you are coding by hand) to what is needed.
Don't be repetitive in your styling.
Make your code readable (and thereby more maintainable).

I would add, learn more about the language.

Most people do not realise that (many moons ago) we used to terminate embedded fields within headings, with the close carat. That seems to be a thing of the past now!

If you take your code and comment out the styling for titles, you will see that you get close to what you need. However, that doesn't meet your title styling requirement.

So using some archaic knowledge on place markers, I have come up with this version of your code, which will give you a decent output. I have only tried it with HTML so now it's down to you to do some investigation.

SET ASNAMES=ON
SET HTMLENCODE=ON

DEFINE FILE CAR
FIRST_HEAD1/A20='First';
SECOND_HEAD2/A10='Period';
A/A3='';
THIRD_HEAD3/A50='1st Target = Under 10% >80% (1st Std Only)';
HEAD1/A15='>35%';
HEAD2/A15='>60%';
HEAD3/A15='>80%';
END

TABLE FILE CAR
PRINT RPM NOPRINT
COUNTRY CAR MODEL BODYTYPE SEATS DEALER_COST RETAIL_COST SALES LENGTH WIDTH HEIGHT WEIGHT WHEELBASE FUEL_CAP BHP 
HEADING
"Standard Report"
"SOURCE:DATA"
"Data Current as of Today"
" "
" <FIRST_HEAD1<SECOND_HEAD2 <THIRD_HEAD3"
" <HEAD1<HEAD2<HEAD3>" -* Note the close carat on this line, this normally causes an overflow into the next column so ....
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, FONT='ARIAL', SIZE=8, GRID=ON, BORDER=1.5, COLOR='BLACK', JUSTIFY=CENTER, STYLE=BOLD, $

TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, LINE=1, COLSPAN=15, SIZE=14, $
TYPE=HEADING, LINE=2, COLSPAN=15, STYLE=+ITALIC, $
TYPE=HEADING, LINE=3, COLSPAN=15, STYLE=+ITALIC, $

TYPE=HEADING, LINE=5, BACKCOLOR=RGB(210 210 210), $
TYPE=HEADING, LINE=5, ITEM=1, COLSPAN=2, JUSTIFY=LEFT, BACKCOLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=5, ITEM=2, COLSPAN=1, $
TYPE=HEADING, LINE=5, ITEM=3, COLSPAN=1, $
TYPE=HEADING, LINE=5, ITEM=4, COLSPAN=6, BACKCOLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=5, ITEM=5, COLSPAN=5, COLOR=RGB(153 0 0), $

TYPE=HEADING, LINE=6, BACKCOLOR=RGB(210 210 210), $
TYPE=HEADING, LINE=6, ITEM=1, COLSPAN=2, JUSTIFY=LEFT, BACKCOLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=6, ITEM=2, COLSPAN=4, $
TYPE=HEADING, LINE=6, ITEM=3, COLSPAN=4, $
TYPE=HEADING, LINE=6, ITEM=4, COLSPAN=4, $ -* .... we change the colspan for this component to one less to cater for that overflow.

TYPE=TITLE, BACKCOLOR=RGB(169 169 169), $

ENDSTYLE
END
-RUN


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
One more suggestion.

If you are using fixed text in your headings, do not use computes or defines, just code it!

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
Guru
posted Hide Post
Hi Tony,


Thanks a lot for your solution.
I will try your solution and will further research on the html part and will let you know whether it worked or not.

Thanks a lot again for all your help! Smiler

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
quote:
Don't be repetitive in your styling.

- wise, too bad the GUI guy ain't listenin'!


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
Expert
posted Hide Post
quote:
(if you are coding by hand)

This piece was especially for you Francis Wink

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
Thanks Tony Smiler

There's something buggy about this. The TITLE styling seems to be causing the same problem in v8.0.08.


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
Guru
posted Hide Post
Hi,


Thanks a lot everyone.
It worked!

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
quote:
It worked!

But did you learn anything new? Wink

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
Guru
posted Hide Post
Hi Tony,

Yes I did learn a lot and learnt how to code in an efficient way.
Thanks a lot everyone for your solutions!

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report 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     [SOLVED]Styling not working for a specific heading in the report

Copyright © 1996-2020 Information Builders