Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a percentage as a negative number

Status
Not open for further replies.

agorjest

Technical User
Oct 23, 2007
51
US
Hello,
Using CR12. In a financial report, I'm trying to format a percentage calculation to display as a negative percentage. Here is a sample of the summary data (FYI- "Variance$" is "Budget" minus "Total Costs" & Variance% is "Total Costs" / "Budget).

GL Acct# Ttl Costs Budget Variance$ Variance%
101107 $19,164 $14,190 -$4,974 135%
101108 $9,548 $11,622 $2,074 82%

I want the 135% to show as -135%. I tried using the following formatting formula in Format Field>Numbers>Custom Style>Negatives:
if {@VARIANCE %} > 100 then crLeadingMinus
That did not work. Any suggestions?
Thanks...
 
if variance is a formula multiple it by -1

if variance is a database field create a formula and multiply it by -1

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
The percentage should automatically return as a negative percentage, so the question then becomes what formula are you using to create the percentage? Please show the content, along with the content of any nested formulas.

-LB
 
I ended up going with multiplying the result of the variance formula by -1 and that seems to work. Thanks to both of you for your suggestions...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top