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     [SOLVED] DEFMACRO - 2 conditions

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DEFMACRO - 2 conditions
 Login/Join
 
Member
posted
Has anyone been able to successfully define 2 conditions on a DEFMACRO?
Currently I'm asking to color a field when less than another field. I would also like to only include this where N4 field is equal to 'O'.


$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=N5 LT N6,

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: February 04, 2015Report This Post
Master
posted Hide Post
I can't remember if I've ever tried to do 2 conditions in a when statement, but I have put the condition into a define with an output of "Y" or "N" and then used the result of the define as my WHEN Condition.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Virtuoso
posted Hide Post
DEFINE FILE X
CND /I1 = IF N5 LT N6 AND N4 EQ 0 THEN 1 ELSE 0;
END

TABLE FILE X
PRINT CND NOPRINT
...

DEFMACRO=COND0001,
 MACTYPE=RULE,
 WHEN=CND EQ 1,
$
...
END


Must work.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Great! I'll give it a shot. thank you!


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: February 04, 2015Report This Post
Virtuoso
posted Hide Post
I would rather use a COMPUTE.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Just completed the mods to include the define and it works perfectly.
thank you all for the suggestions.


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: February 04, 2015Report This Post
Master
posted Hide Post
Conditional styling using WHEN will support evaluation of one condition only. So in case of more than 1 condition, either use DEFINE or COMPUTE(use COMPUTE for better performance).

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Platinum Member
posted Hide Post
Just a word of caution, as I'm just now finding this out after a crap-ton of digging.

I was getting "Unreadable Content" errors in my Excel reports, and I've now narrowed it down to the cause being that if you have

  • No records (probably due to a WHEN filter)
  • A COMPUTE
  • A DEFMACRO that uses the computed value


Most of my reports use EMPTYREPORT=ON (don't ask), but in this case, apparently WebFOCUS can't handle it when the WHEN clause in the DEFMACRO uses a compute field that's blank.

Unfortunately, I can't just set EMPTYREPORT=OFF, because this is the first report in a set of compound reports, and I at least need it to do `FORMAT XLSX OPEN AS report_name`.



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
 
Posts: 141 | Location: North Carolina | Registered: August 10, 2012Report 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     [SOLVED] DEFMACRO - 2 conditions

Copyright © 1996-2020 Information Builders