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 - some .0 are red, some aren't, HELP!

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Conditional Styling - some .0 are red, some aren't, HELP!
 Login/Join
 
<matty@time>
posted
I'm using this format on a computed field,

COMPUTE SCHG/D6.1B=(PCT.&SHOW1-PCT.&SHOW2);

The "B" gives you (21.1) in place of -21.1, so then I add this line to the stylesheet:

TYPE=DATA, COLUMN=SCHG, COLOR=RED, WHEN=SCHG LT 0, $

Works great, until WebFOCUS decides to carry out the calculation past the D6.1, so I end up with some RED .0 that dont have brackets. Seems the "B" cuts off based on the D6.1, but the stylesheet code doesn't. Can I force the stylesheet to only use the displayed values? I.E. the D6.1?

HELP!

Matthew
CMI@Time Inc
matthew_rossi@timeinc.com
 
Report This Post
<Pietro De Santis>
posted
Have you tried increasing the size of the field:

D8.1B

?
 
Report This Post
<matty@time>
posted
I'll try it, but how would that help if the problem seems to come from the way "B" and stylesheet comands read values AFTER the decimal?

For example:

If the real value is

-.0001 but I'm using D6.1B I wont get (.0) I just get .0 which is fine.

But, conditional styling will turn this RED (ignoring the D6.1) anyway, which stinks.

M
 
Report This Post
<Pietro De Santis>
posted
I'm not sure what you mean by "until WebFOCUS decides to carry out the calculation past the D6.1"?



TABLE FILE CAR
PRINT MODEL
COMPUTE APPLE/D6.1B = -10.5;
COMPUTE ORANGE/D6.1B = -2000.5;
COMPUTE BANANA/D6.1B = -200550.5;

WHERE RECORDLIMIT EQ 5

HEADING
" "

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF,
FONT='VERDANA', SIZE=8, $
TYPE=DATA, COLUMN=APPLE, COLOR=RED, WHEN=APPLE LT 0, $
TYPE=DATA, COLUMN=ORANGE, COLOR=RED, WHEN=ORANGE LT 0, $
TYPE=DATA, COLUMN=BANANA, COLOR=RED, WHEN=BANANA LT 0, $
ENDSTYLE
END

gives me red data even if the data is too large to display in the D6.1B.

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
<matty@time>
posted
This is what i mean, AFTER the DECIMAL, run this, you will understand, you'll get RED .0 without the ().



TABLE FILE CAR
PRINT MODEL
COMPUTE APPLE/D6.1B = -10.5;
COMPUTE ORANGE/D6.1B = -2000.5;
COMPUTE BANANA/D6.1B = -200550.5;
COMPUTE CRAP/D6.1B = -0.0001;
WHERE RECORDLIMIT EQ 5
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=DATA, COLUMN=APPLE, COLOR=RED, WHEN=APPLE LT 0, $
TYPE=DATA, COLUMN=ORANGE, COLOR=RED, WHEN=ORANGE LT 0, $
TYPE=DATA, COLUMN=BANANA, COLOR=RED, WHEN=BANANA LT 0, $
TYPE=DATA, COLUMN=CRAP, COLOR=RED, WHEN=CRAP LT 0, $
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
<Pietro De Santis>
posted
Works for me:



Must have been fixed in a recent version.
 
Report This Post
Platinum Member
posted Hide Post
Try using P format:

COMPUTE SCHG/P6.1BC = ... ;

Example with CAR file:

TABLE FILE CAR
PRINT
COUNTRY NOPRINT
COMPUTE DECIMAL/D6.1B = -0.0001 ;
COMPUTE PACKED/P6.1B = -0.0001 ;
IF RECORDLIMIT EQ 1
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, $
TYPE=DATA, COLUMN=DECIMAL, COLOR=RED, WHEN=DECIMAL LT 0, $
TYPE=DATA, COLUMN=PACKED , COLOR=RED, WHEN=PACKED LT 0, $
ENDSTYLE
END

Results

Column DECIMAL .0 red
Column PACKED .0 black

Explanation from Creating Reports - Numeric Formats - Rounding
quote:

  • Packed‑decimal format. When a value is assigned to a packed‑decimal field, and the value has more decimal places than the field's format specifies, the value is rounded before it is stored.
  • Floating‑point double and single‑precision formats. When a value is assigned to one of these fields, and the value has more decimal places than the field's format specifies, the full value is stored in the field (up to the limit of precision determined by the field's internal storage type). When this value is later displayed, however, it is rounded.

Regards,
Mikel

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
<wwmyers>
posted
Change D6.1B to P6.1B

It will be rounded to 1 decimal place and should work
 
Report 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 - some .0 are red, some aren't, HELP!

Copyright © 1996-2020 Information Builders