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     ***CLOSED Conditional Formatting?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
***CLOSED Conditional Formatting?
 Login/Join
 
Master
posted
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
END

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


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Expert
posted Hide Post
WF style something like:
TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=GREEN, WHEN=MSSGNBR EQ 1, $
TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=RED  , WHEN=MSSGNBR EQ 2, $


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
Master
posted Hide Post
trying similar stuff...no effect?

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
quote:
TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=GREEN, WHEN=MSSGNBR EQ 1, $
TYPE=DATA, COLUMN=MESSAGE, BACKCOLOR=RED , WHEN=MSSGNBR EQ 2, $


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
again...no effect:

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


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
You need to also PRINT CONDSW.


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
Master
posted Hide Post
Thank you!


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report 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     ***CLOSED Conditional Formatting?

Copyright © 1996-2020 Information Builders