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     Negative Bracket not working

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Negative Bracket not working
 Login/Join
 
Member
posted
Hi,
Please look at the piece of code,
TABLE FILE ABC
AAA / D10B = BBB - CCC;
END

The output of the above code has brackets replacing negative values, i.e. -10.12 , is displayed as (10).
But when say the result of the difference is -0.12, the output is just 0, with no brackets around it.

What should i do to overcome this problem?
Expected output is (0)


WebFOCUS 7.6.6
Windows XP
Output: Excel, PDF, HTML
 
Posts: 13 | Registered: March 31, 2008Report This Post
Virtuoso
posted Hide Post
As you are not allowing for decimal places in your format,D10B, the -0.12 is marked as zero which I'm assuming FOCUS and WebFOCUS treat as a positive number.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Member
posted Hide Post
Thanks.
But the problem is, is have this bit of code in the style sheet as well,

TABLE FILE ABC
AAA / D10B = BBB - CCC;
END
COLUMN=AAA,COLOR=RED,WHEN=AAA LT 0, $

So what happens is when AAA is 0 i.e. say -0.12 being rounded of to 0, brackets do not appear around it but it is highlighted in red color.

I want either the brackets to appear or the value should not be colored when its rounded off to 0


WebFOCUS 7.6.6
Windows XP
Output: Excel, PDF, HTML
 
Posts: 13 | Registered: March 31, 2008Report This Post
Expert
posted Hide Post
Either extend the decimal places shown on the field so that your expression is correct or do not use double precision as its format, as double precision retains the true value internally.

You can see what I mean in the code below. Firstly I compute a value based on two numeric fields. The computed output has no decimal places but the result is then passed to a computed field that does have decimal places. I do this twice, once for double precision and once for packed decimal. Comparison of the passed computed value shows that double precision still holds the "true" value whereas packed decimal doesn't.

APP PREPENDPATH IBISAMP
TABLE FILE GGSALES
SUM DOLLARS
    BUDDOLLARS
    COMPUTE D_DIFF/D10B = 1 - (DOLLARS / BUDDOLLARS);
    COMPUTE D_PASS/D10.5B = D_DIFF;
    COMPUTE P_DIFF/P10B = 1 - (DOLLARS / BUDDOLLARS);
    COMPUTE P_PASS/P10.5B = P_DIFF;
BY REGION
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
  TYPE=DATA, COLUMN=D_PASS, COLOR=RED, WHEN=D_PASS LT 0, $
  TYPE=DATA, COLUMN=P_PASS, COLOR=RED, WHEN=P_PASS LT 0, $
ENDSTYLE
END

Rule: Use the correct precision for the task in hand Smiler

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     Negative Bracket not working

Copyright © 1996-2020 Information Builders