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     conditional styling on a define field using a define field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
conditional styling on a define field using a define field
 Login/Join
 
Gold member
posted
I am trying to highlight a define field with the following line of code, but it doesn't work.

TYPE=DATA,COLUMN=CURRQTYI,BACKCOLOR=RED,WHEN=IFSGTI EQ 1,$

CURRQTYI and IFSGTI are define fields.

Please help.

Thank you,
KK


Test - Webfocus 7.6.7
Prod - Webfocus 7.6.7
Win2003
Sql Server 2000 and 2008
 
Posts: 59 | Registered: May 01, 2007Report This Post
Expert
posted Hide Post
DEFINE FILE CAR
PROFIT/D12=RETAIL_COST-DEALER_COST;
CKPROF/I1=IF PROFIT GE 1500 THEN 1 ELSE 0;
END
TABLE FILE CAR
PRINT
     SALES
     PROFIT
     CKPROF NOPRINT
BY COUNTRY
BY CAR
BY MODEL
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=N6 EQ 1,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=DATA,
     COLUMN=N5,
     BACKCOLOR='RED',
     MACRO=COND0001,
$
ENDSTYLE
END


Make sure that you include the field you are testing on in the body of the report and NOPRINT it. See CKPROF above.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Gold member
posted Hide Post
Ginny,

Thank you very much for your quick response. I tried that but it isn't working. I noticed that you are using column names (N5 and N6),
I dont' think I can use that in my report as the details are written out under the subhead :-

ON PARTNO SUBHEAD
"Part: <+0> Past 12 Months Sales Qty: <+0>Selected Month Sales Qty: <+0>Selected Month Inventory: CURRQTYI"

"Safety: <+0> SCURRQTY<+0>
Note: Selected month inventory is greater than Safety

I want to highlight this part "Selected Month Inventory: CURRQTYS <+0>" and display a message "Note: Selected month inventory is greater than Safety"

Here is the define field code IFSGTI/I2 = IF SCURRQTY GT CURRQTYI THEN 1 ELSE 0;

Thanks,
KK.

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


Test - Webfocus 7.6.7
Prod - Webfocus 7.6.7
Win2003
Sql Server 2000 and 2008
 
Posts: 59 | Registered: May 01, 2007Report This Post
Gold member
posted Hide Post
Tom,

I didn't post the code but I am printing those define fields

TABLE FILE HOLD1
SUM SALEQTY
SCURRQTY
CURRQTYI
IFSGTI NOPRINT

etc..
END


Test - Webfocus 7.6.7
Prod - Webfocus 7.6.7
Win2003
Sql Server 2000 and 2008
 
Posts: 59 | Registered: May 01, 2007Report This Post
Expert
posted Hide Post
You can use the column name instead of the notation. I did my styling with the Report Painter and didn't go back and change it. Either should work.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
KK

Please post your whole code. It is a bit confusing to see only some lines.

I think your "compute" line should be in the table part instead of in the define.
You are summing records instead of printing.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
<Meghan>
posted
I want to do the EXACT same thing but I want the computed column to also display in my report and to have the associated background styling in relation to another column. Can anyone help?
 
Report This Post
Virtuoso
posted Hide Post
Meghan,

Welcome to the Forum.
Please ** Update signature This helps us help you with what version you are using.

1) Logon to Focal Point and go into your complete profile.
2) Scroll down the page until you see the “Signature” field.
3) Fill in the signature you want to use. Here is a sample to model:

Prod: WebFOCUS 5.2.3 on Win 2K/IIS 6/ISAPI Mode
Test: WebFOCUS 7.1 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode

4) Once all changes are made/added, scroll down to the bottom of the page and click on the Submit button.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
I noticed the you wanted to print out a note which is conditional to month inventory greated than safety:
quote:
Note: Selected month inventory is greater than Safety


In order to do that you have to issue 2 SUBFOOT operations, the second having a WHEN clause. See the following:
  
-* File CondColors.fex
SET BYDISPLAY = ON
SET CENT-ZERO=ON

DEFINE FILE CAR
RATIO/D6.3=DEALER_COST / RETAIL_COST;
PROFIT/D7=RETAIL_COST - DEALER_COST;
END
TABLE FILE CAR
BY COUNTRY
BY CAR
BY MODEL
BY RATIO NOPRINT

ON MODEL SUBHEAD
" "
ON MODEL SUBFOOT
" <+0>Dealer Cost: <DEALER_COST Retail Cost: <RETAIL_COST  Profit: <PROFIT "
"Ratio: <RATIO "
ON MODEL SUBFOOT
"Ratio less than 0.84"
WHEN RATIO LT 0.84;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
     DEFMACRO=COND84,
     MACTYPE=RULE,
     WHEN=N4 LT 0.84,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     SIZE=10,
$
TYPE=SUBFOOT,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     COLOR='RED',
     MACRO=COND84,
$
TYPE=SUBFOOT,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=4,
     COLOR='RED',
     MACRO=COND84,
$
TYPE=SUBFOOT,
     BY=3,
     LINE=1,
     OBJECT=FIELD,
     ITEM=3,
     COLOR='RED',
     MACRO=COND84,
$
ENDSTYLE
END

You will notice that when there are 2 SUBFOOT operations, WF will not distinguish between the two for styling. This means that coding the style is a bit tricky.
See that in order to color the note, WF addresses it as LINE=1 also:
  
TYPE=SUBFOOT,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     COLOR='RED',
     MACRO=COND84,
$

That is why, it is necessary to add a dummy text field in LINE 1 of the first SUBFOOT operation.
  
" <+0>Dealer Cost: <DEALER_COST Retail Cost: <RETAIL_COST  Profit: <PROFIT "


I hope this helps.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     conditional styling on a define field using a define field

Copyright © 1996-2020 Information Builders