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 was hoping someone could point me in the right direction so I could learn how to use css to create alternate row colors within the data portion of a webfocus report.
Thanks for the help, BThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.7 Windows All Output (Excel, HTML, PDF)
Posts: 31 | Location: Maryland, USA | Registered: April 30, 2010
Do it the old-fashioned way, with a flag or indicator:
TABLE FILE CAR
PRINT
COUNTRY CAR MODEL BODYTYPE
COMPUTE CLASSFLAG/A1 = IF CLASSFLAG EQ '' THEN '2' ELSE ''; NOPRINT
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, $
TYPE=DATA, CLASS=class2, WHEN= CLASSFLAG EQ '2', $
TYPE=DATA, CLASS=class1, WHEN= CLASSFLAG EQ '', $
ENDSTYLE
ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<STYLE>
body { font-family: Arial, sans-serif; font-size: 12px; }
.class1 { background-color: yellow; }
.class2 { background-color: red; }
</STYLE>
!IBI.FIL.H001;
-HTMLFORM 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
That's the way you insert the contents of your report (ON TABLE HOLD FORMAT HTMTABLE) into the HTMLFORM: !IBI.FIL.filename
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
then use this line to reference... ON TABLE SET CSSURL mycss.css
So you're saying I don't have to use that line?
Actually, I think I understand. It looks like you're creating the hold file first then passing that to an html form, where as I'm just embedding css into my focus code and referencing the css classes. Am I correct?
This message has been edited. Last edited by: bflemi3,
WebFOCUS 7.7 Windows All Output (Excel, HTML, PDF)
Posts: 31 | Location: Maryland, USA | Registered: April 30, 2010
How can I learn more about incorporating html/javascript and style sheets into my focus code? Are there any websites/documentation/tutorials you're aware of?
WebFOCUS 7.7 Windows All Output (Excel, HTML, PDF)
Posts: 31 | Location: Maryland, USA | Registered: April 30, 2010
That solution gets tedious (impossible?) once you're dealing with across-columns. I haven't found the correct way to deal with those yet, a suggestion would be appreciated.
In CSS3 you can use the new nth-child selector, eg:
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 :
Originally posted by Wep5622: That solution gets tedious (impossible?) once you're dealing with across-columns. I haven't found the correct way to deal with those yet, a suggestion would be appreciated.
Never mind, I just remembered there's ACROSSCOLUMN=...
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 :