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!

if number field negative display 0 as -0

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
CA
Hi there. I have a time field with a whole number and decimal, i.e. 15.65 or 0.25 or -8.50 or -0.25. In my report, I split out the whole number from the fraction. If the number field is a -negative, I still want the zero to display as -0. So for example -0.25 would be -0 25

any ideas other than converting it to a text and +"-"

Thanks.
 
Zero isn't a negative number, so logicall Crystal doesn't display it as such because your audience wants it to be negative.

An IF with a totext seems the way to go, not sure why you're opposed to that.

-k
 
If you are willing to put the '-' on the right side you can try conditional formatting and only put the '-' when the field is negative.

I use this when I show a claim count. I don't like the way "1 Claims" looks so I test for 1 and put the singular 'Claim' in a text box else I use the plural 'Claims'.

if DistinctCount ({CLAIM.CLAIM_NUMBER}, {tblUserIDManagerID.Manager}) = 1 then 'Claim' else 'Claims'

Then I would get something like:
Mary had 1 Claim
Joe had 3 Claims
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top