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     Problems with Style sheet and WHEN clause

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problems with Style sheet and WHEN clause
 Login/Join
 
Member
posted
Here's the code:

TABLE FILE HOLDBOTH
HEADING
"&HDRNAME"
PRINT SUB_ASSET_COUNT AS 'SAP, # of, Assets'
COMPANY_CD AS 'SAP,Company'
CPCCOMPANY AS 'CPCS,Company'
DEPR_COST_CENTER AS 'SAP,Depr,CC'
DEPT_OWNER AS 'CPCS,Dept,Owner'
ACQ_DATE AS 'SAP,Acq,Date'
DATE_PRCH_YR AS 'CPCS,Acq Year'
DESCR AS 'SAP Description'
NOUN_DESC AS 'CPCS Description'
LOCATION_CD AS 'SAP,Bldg'
LOC_BLDG_OWN AS 'CPCS,Bldg'
MANUFACTURER AS 'SAP,Manufacturer'
NOUN_MANUF AS 'CPCS,Manufacturer'
ACQ_COST/D20.2C AS 'SAP,Acq Cost'
COST_ITEM/D20.2C AS 'CPCS,Acq Cost'
NET_BOOK_VAL/D16.2C AS 'SAP NBV'
ITEM_BK_VAL/D16.2C AS 'CPCS NBV'
CER AS 'SAP CER'
ASSET_NBR AS 'SAP Asset'
CODE_LOC AS 'CPCS,Location'
DIV_OWNER AS 'CPCS Division'
ETC_ID_KEY AS 'CPCS GAP'

BY TAG_NBR AS 'Tag Number'
&VARIF
ON TABLE SET STYLE *
TYPE=REPORT, FONT='MS SANS SERIF', SIZE=2, WRAP=OFF, $
TYPE=DATA, COLUMN=N1,COLOR='BLUE',
STYLE=UNDERLINE,
FOCEXEC=tag_exec.fex(Tag=TAG_NBR STYLE=&STYLE SAPCo=COMPANY_CD CPCSCo=CPCCOMPANY), $
TYPE=DATA, COLUMN=N2,
COLOR='RED',
STYLE=BOLD,
justify=center,
WHEN=SUB_ASSET_COUNT GT 1,$

TYPE=DATA, COLUMN=N3,
COLOR='RED',
WHEN=COMPANY_CD NE CPCCOMPANY,$
TYPE=DATA, COLUMN=N4,
COLOR='RED',
WHEN=COMPANY_CD NE CPCCOMPANY,$
TYPE=DATA, COLUMN=N5,
COLOR='RED',
WHEN=VDEPT EQ 1,$
TYPE=DATA, COLUMN=N6,
COLOR='RED',
WHEN=VDEPT EQ 0,$
TYPE=DATA, COLUMN=N7,
COLOR='RED',
WHEN=SDATE_YEAR NE DATE_PRCH_YR,$
TYPE=DATA, COLUMN=N8,
COLOR='RED',
WHEN=SDATE_YEAR NE DATE_PRCH_YR,$
TYPE=DATA, COLUMN=N9,
COLOR='RED',
WHEN=SDESCRIPTION NE NOUN_DESC,$
TYPE=DATA, COLUMN=N10,
COLOR='RED',
WHEN=SDESCRIPTION NE NOUN_DESC,$
TYPE=DATA, COLUMN=N11,
COLOR='RED',
WHEN=SLOC_BLDG NE LOC_BLDG_OWN,$
TYPE=DATA, COLUMN=N12,
COLOR='RED',
WHEN=SLOC_BLDG NE LOC_BLDG_OWN,$
TYPE=DATA, COLUMN=N15,
COLOR='RED',
WHEN=COSTDIFF NE 0,$
TYPE=DATA, COLUMN=N16,
COLOR='RED',
WHEN=COSTDIFF NE 0,$

TYPE=DATA, COLUMN=N17,
COLOR='RED',
WHEN=NET_BOOK_VAL NE ITEM_BK_VAL,$
TYPE=DATA, COLUMN=N18,
COLOR='RED',
WHEN=NET_BOOK_VAL NE ITEM_BK_VAL,$

ENDSTYLE
ON TABLE PCHOLD FORMAT &STYLE
END

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The WHEN clause should change the format adjacent columns when the data in the two columns disagree. It works for one set of columns, but not the others.


The code highlighted in green works, that in red does NOT work. I'm thinking that the WHEN clause has something to do with it, but it's hard to tell, as I've been playing around with it. Am I missing something, or does this appear to be coded correctly?


thanks,
carl


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
TABLE FILE HOLDBOTH
HEADING
"&HDRNAME"
PRINT SUB_ASSET_COUNT AS 'SAP, # of, Assets'
COMPANY_CD AS 'SAP,Company'
CPCCOMPANY AS 'CPCS,Company'
DEPR_COST_CENTER AS 'SAP,Depr,CC'
DEPT_OWNER AS 'CPCS,Dept,Owner'
ACQ_DATE AS 'SAP,Acq,Date'
DATE_PRCH_YR AS 'CPCS,Acq Year'
DESCR AS 'SAP Description'
NOUN_DESC AS 'CPCS Description'
LOCATION_CD AS 'SAP,Bldg'
LOC_BLDG_OWN AS 'CPCS,Bldg'
MANUFACTURER AS 'SAP,Manufacturer'
NOUN_MANUF AS 'CPCS,Manufacturer'
ACQ_COST/D20.2C AS 'SAP,Acq Cost'
COST_ITEM/D20.2C AS 'CPCS,Acq Cost'
NET_BOOK_VAL/D16.2C AS 'SAP NBV'
ITEM_BK_VAL/D16.2C AS 'CPCS NBV'
CER AS 'SAP CER'
ASSET_NBR AS 'SAP Asset'
CODE_LOC AS 'CPCS,Location'
DIV_OWNER AS 'CPCS Division'
ETC_ID_KEY AS 'CPCS GAP'

COMPUTE FLAG/A1 = IF COMPANY_CD NE CPCCOMPANY THEN 'Y' ELSE 'N'; NOPRINT


TYPE=DATA, COLUMN=N3,
COLOR='RED',
WHEN=FLAG EQ 'Y',
$

VDEPT and COSTDIFF will probably never be 0, use LT when STYLing negative values; it's a MATH thing...

The manual discusses how WHEN works in STYLing data...

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
This works, thanks. One additional thing that I had to do was count the "NOPRINT" columns as well as the normal columns.

Now can you explain to me why this formatting won't work when I run with style EXCEL, but it WILL work when I run with EXL2L?

And one further question - the drill down won't work when I run style EXL2L - when I click on the drill down link, it takes me to a sign on page and it just stops there. This doesn't happen when I run HTML.

Thanks,
carl

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


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
Carl,

1) Yes, each column is counted AFTER the BY columns, regardless of NOPRINT; WebFOCUS Internals
2) FORMAT EXCEL - EXCEL 97 vs. EXCEL 2002,2003 FORMAT EXL2K are different in the way they retain STYLing attributes; it's an EXCEL thing... The manual will explain the differences.
3) Which SIGNON page, MRE or EDASERVE???

quote:

FOCEXEC=tag_exec.fex(Tag=TAG_NBR STYLE=&STYLE SAPCo=COMPANY_CD CPCSCo=CPCCOMPANY), $


may want to add the folder name:

FOCEXEC=FOLDERNAME/tag_exec.fex(Tag=TAG_NBR STYLE=&STYLE SAPCo=COMPANY_CD CPCSCo=CPCCOMPANY), $
Also, When I send an &VARIABLE (&STYLE), I use STYLE='&STYLE.EVAL'
Also, STYLE is a WebFOCUS keyword, may want to change that....


Glad it worked out for you...

EDIT: Add #3...

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
Instead of using N# to indicate which columns to use for comparison, try using P#. The P# is used to reference only to the columns that appear on the report, hence you do not need to worry about NOPRINTed fields.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Member
posted Hide Post
Tom-

Adding the folder name didn't do anything. It goes to the screen where you put in a USer ID and password.

thanks,


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
 
Posts: 27 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
Carl,

Now you are getting into the area of Security Configuration/Administration.

We don't know how you installed, configured, etc.

Here's a link to start with:

Setting Authentication Credentials

With the product, you should have received a Manual: WebFOCUS Security and Administration

It is also available on-line - at the top of this page is a link to the Technical Documentation Library

You may also have to modify SITE.wfs from the WebFOCUS Client Console (these are case-sensitive):

  
<set> IBIMR_user(pass)
<set> IBIMR_pass(pass)
<set> IBIMR_domain(pass)
<set> MR_FULL_FEXNAME(pass)
<set> MR_ITEM_HANDLE(pass)
 
This allows you to use the following variables:

&IBIMR_user      The MRE or LAN ID
&IBIMR_pass      The MRE or LAN password
&IBIMR_domain    The Domain of the submitted MRE focexec
&MR_FULL_FEXNAME The Descriptive name of MRE Focexec
&MR_ITEM_HANDLE  The href of submitted focexec



Good Luck...

EDIT: Typo

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 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     Problems with Style sheet and WHEN clause

Copyright © 1996-2020 Information Builders