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] Multiple Conditions for Traffic Light Formatting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Multiple Conditions for Traffic Light Formatting
 Login/Join
 
Member
posted
Is there a method of applying multiple conditions to the traffic light formatting rules? For example, i want to highlight a cell if it satisfies RULE1 (X>10) AND RULE2(Y<10).

This message has been edited. Last edited by: <Kathryn Henning>,


8103
Server 2012
 
Posts: 11 | Location: Danbury CT | Registered: March 12, 2015Report This Post
Master
posted Hide Post
You must create a define with multi-conditions.

ENGINE INT CACHE SET ON

-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE ibisamp/car
ISRED/I1 = IF SALES GT 0 AND SALES LT 8000 THEN 1 ELSE 0;
ISGREEN/I1 = IF SALES GT 8000 THEN 1 ELSE 0;
END

TABLE FILE ibisamp/car
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY ISRED NOPRINT
BY ISGREEN NOPRINT
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET CACHELINES 100
ON TABLE SET GRWIDTH 1
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=ISRED EQ 1, $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=ISGREEN EQ 1, $
TYPE=REPORT, TITLETEXT='WebFOCUS Report', SUMMARY='Summary', $
TYPE=DATA, COLUMN=SALES, MACRO=Condition_1, FONT='Trebuchet MS', BACKCOLOR=RGB(255 0 0), $
TYPE=DATA, COLUMN=SALES, MACRO=Condition_2, FONT='Trebuchet MS', BACKCOLOR=RGB(0 255 0), $
ENDSTYLE
END

-RUN



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Gavin,

Its nice to see DEFMACRO still being used.

Its too easy to just code the WHEN.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
@Waz

That's because the GUI does it with DEFMACRO.

I didn't even know WHEN could also be used. It isn't documented ( anymore ).


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Expert
posted Hide Post
I've go so used to adding WHEN in that we have replicated conditions, where we could have the DEFMACRO set up.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
quote:
Its nice to see DEFMACRO still being used.

Its too easy to just code the WHEN.


I did this in InfoAssist, then added the define at the code level. However, I'm always in a learning mode, so please show me how you would do it.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=ISRED EQ 1, $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=ISGREEN EQ 1, $
TYPE=REPORT, TITLETEXT='WebFOCUS Report', SUMMARY='Summary', $
TYPE=DATA, COLUMN=SALES, MACRO=Condition_1, FONT='Trebuchet MS', BACKCOLOR=RGB(255 0 0), $
TYPE=DATA, COLUMN=SALES, MACRO=Condition_2, FONT='Trebuchet MS', BACKCOLOR=RGB(0 255 0), $


TYPE=REPORT, TITLETEXT='WebFOCUS Report', SUMMARY='Summary', $
TYPE=DATA, COLUMN=SALES, WHEN=ISRED EQ 1, FONT='Trebuchet MS', BACKCOLOR=RGB(255 0 0), $
TYPE=DATA, COLUMN=SALES, WHEN=ISGREEN EQ 1, FONT='Trebuchet MS', BACKCOLOR=RGB(0 255 0), $


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
I didn't know you can put a WHEN within a TYPE clause. Good One

Guess that is why your an expert and I'm just a guru. Big Grin



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
I always wanted to be a Guru, but got past it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
I've just schooled on why use defmacro over WHEN within the TYPE.

If you have multiple columns that you need the same condition, then using a macro there is only one line to change instead of all the columns that are affected.




- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 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     [CLOSED] Multiple Conditions for Traffic Light Formatting

Copyright © 1996-2020 Information Builders