I am trying to get a negative sign to show BEFORE the dollar amount but I am unable to get it to work by using all the suggestions I have seen on here. I am not sure if I need to change it in my WebFocus FEX file or in the view on my database side?
Here is what it says in the database:
,SUM(COALESCE(CAST(TOTAL_UNDER_PAY * 1.00 AS DECIMAL(15,2)),0)+ COALESCE(CAST(BAL * 1.00 AS DECIMAL(15,2)),0)) AS TOTAL_UPAY
and then I am just calling it into the report as is through the FEX. The amount is already read as a negative number but I need it to show as negative for the viewers.
What coding should I use to make the negative sign show up BEFORE the dollar amount?This message has been edited. Last edited by: Julie H.,
WebFOCUS 7.6 Windows, All Outputs
June 20, 2011, 11:11 AM
GamP
Before the dollar amount (like $ -100.00) or before the dollar sign (like -$ 100.00). I think the second option is quite standard, the first requires some creativity.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
June 20, 2011, 11:16 AM
Prarie
Yes are you talking dollar amount or dollar sign?
It already prints before the amount.
June 20, 2011, 11:40 AM
Julie H.
I need the negative sign to print before the dollar amount (there is not a dollar sign)
Example: -11,000
Do I need to change something in the database coding above (in the first post) to bring the number back with the negative sign or add coding to my FEX to make that number have a negative sign before it? And what coding would I use?
Thanks!
WebFOCUS 7.6 Windows, All Outputs
June 20, 2011, 01:01 PM
shakila25
Hi,
if amount is GE 0 then '+' || amount else '-' || amount
Thanks!
WebFOCUS 7.6.x Windows Output: Excel,PDF, HTML
June 20, 2011, 03:12 PM
Julie H.
quote:
,SUM(COALESCE(CAST(TOTAL_UNDER_PAY * 1.00 AS DECIMAL(15,2)),0)+ COALESCE(CAST(BAL * 1.00 AS DECIMAL(15,2)),0)) AS TOTAL_UPAY
Thanks for the suggestions, I was able to make it work on the database side by changing the coding to TOTAL_UNDER_PAY * -1.00
WebFOCUS 7.6 Windows, All Outputs
June 20, 2011, 03:15 PM
Prarie
Negative amounts should print that way...see this example. I'm not sure what format you are using.
DEFINE FILE CAR COSTS/D12 = RETAIL_COST * (-1); END TABLE FILE CAR PRINT COSTS BY CAR END