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.
Is it possible in WF8 to format the background color of a cell based on the value of another cell.
Ex: TBLMSTR_MESSAGES contains two columns: MSSGNBR and MESSAGE. We want to Print the MESSAGE on a report but have the background color be GREEN if MSSGNBR=1 and red if MSSGNBR = 2. Can this be done?
How would I alter this code?
TABLE FILE TBLMSTR_MESSAGES PRINT TBLMSTR_MESSAGES.TBLMSTR_MESSAGES.MESSAGE ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ TYPE=TITLE, COLUMN=N1, BACKCOLOR='GREEN', $ TYPE=REPORT, COLUMN=N1, WRAP=6.000000, $ ENDSTYLE ENDThis message has been edited. Last edited by: RobertF,
DEFINE FILE TBLMSTR_MESSAGES CONDSW/A1=IF MSGNBR EQ '2' THEN '1' ELSE '0'; END
TABLE FILE TBLMSTR_MESSAGES PRINT TBLMSTR_MESSAGES.TBLMSTR_MESSAGES.MESSAGE ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=GREEN, WHEN=CONDSW EQ 1, $ TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=RED , WHEN=CONDSW EQ 2, $ TYPE=REPORT, COLUMN=N1, WRAP=6.000000, $ ENDSTYLE END
DEFINE FILE TBLMSTR_MESSAGES CONDSW/A1=IF MSGNBR EQ '2' THEN '1' ELSE '0'; END
TABLE FILE TBLMSTR_MESSAGES PRINT TBLMSTR_MESSAGES.TBLMSTR_MESSAGES.MESSAGE ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=GREEN, WHEN=CONDSW EQ '1', $ TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=RED , WHEN=CONDSW EQ '0', $ INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ ENDSTYLE END
You have to specify the column that is used in the report WHEN clause :
DEFINE FILE TBLMSTR_MESSAGES
CONDSW/A1=IF MSGNBR EQ '2' THEN '1' ELSE '0';
END
TABLE FILE TBLMSTR_MESSAGES
PRINT
TBLMSTR_MESSAGES.TBLMSTR_MESSAGES.MESSAGE
CONDSW NOPRINT
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=GREEN, WHEN=CONDSW EQ '1', $
TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=RED , WHEN=CONDSW EQ '0', $
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
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
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 :