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] BAD VALUE IN STYLESHEET- CONDITIONAL FORMAT ACROSS COMPUTE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] BAD VALUE IN STYLESHEET- CONDITIONAL FORMAT ACROSS COMPUTE
 Login/Join
 
Gold member
posted
Hello all. I've viewed a number of post regarding a stylesheet error "bad value" but cannot seem to get a solution.
I am creating a report that computes the difference and % difference of columns after an ACROSS. I am trying to create a condition on the % change. Here's what I have and it was built in the GUI:
SUM
'CNT.CUSTOMER/I9C'
BY 'GROUP'
ACROSS 'MONTH'
COMPUTE DIFFERENCE/D12C = C2 - C1;
COMPUTE PERCENT_CHANGE/D12.3% = (DIFFERENCE / C1 ) * 100;
COMPUTE FLAG/A1 = IF ( PERCENT_CHANGE GT 5 ) THEN 'Y' ELSE 'N';
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=FLAG EQ 'Y',
-* Bunch of styling follows this, then GUI
-* builds this:
$
TYPE=DATA,
COLOR='RED',
STYLE=BOLD,
MACRO=COND0001,
-* More styling
END

How does WF treat computed fields that need to come after an ACROSS? Does it not recognize them as legitimate fields?

Thanks all.

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


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Virtuoso
posted Hide Post
Hello BobV,

It seems like you cannot reference COMPUTE'd fields by name when they've been created after an ACROSS but you can reference them by position.

Your example leads me to think that the number of ACROSS values in your request is always the same (2 months) which simplifies things. I've worked out an example using the CAR table based on a similar post (Negative Red) which might be useful to your case:

TABLE FILE CAR
SUM SALES
BY CAR
ACROSS COUNTRY
COMPUTE DIFFERENCE/D12C = C2 - C1;
COMPUTE PERCENT_CHANGE/D12.3% = (DIFFERENCE / C1 ) * 100;
COMPUTE FLAG/A1 = IF ( PERCENT_CHANGE LT 0 ) THEN 'Y' ELSE 'N';
WHERE COUNTRY IN ('ENGLAND', 'JAPAN')
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=C5 EQ 'Y', $
TYPE=DATA, COLOR='RED', STYLE=BOLD, MACRO=COND0001, $
ENDSTYLE
END


The main point there is that the FLAG field is being referenced as C5 (positional notation) instead of by name and in that case the conditional style works.


Neftali.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
Neftali, thanks for the quick response. More importantly, thanks for the solution. This worked. The GUI could use a little help when dealing with this.
7.6.1 would not do it for me, perhaps 7.6.10 will once we get it.


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
 
Posts: 93 | Registered: February 20, 2008Report This Post
Virtuoso
posted Hide Post
You're very welcome. I'm glad it helped!

I totally agree with you on the need for a much better support on these and other features from the GUI in Dev Studio but for now we'll have to rely on the good ol' editor.

Cheers,
Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report 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] BAD VALUE IN STYLESHEET- CONDITIONAL FORMAT ACROSS COMPUTE

Copyright © 1996-2020 Information Builders