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.
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, IPThis message has been edited. Last edited by: info4pal,
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 :
Thank you but this is not what Iam looking for. 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.
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 :
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, 2004