Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Putting () around a numberic field Post Reply Post New Topic
Author Message
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Topic: Putting () around a numberic field
     Posted: 13 May 2011 at 5:40am
Good Morning,
 
I have a numberic field that represents a negative value even though the value is not negative.  Is there any way in crystal to make the field have () aound it without actually turning it negative?
 
 
Thanks :)
dkalsow
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 13 May 2011 at 5:54am
'(' & {table.numericfield} & ')'
|< /\ '][' ( )
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 13 May 2011 at 5:58am
^^^^^^^ will actually turn it into a string. So it will work as long as you are not calculating totals. If you are trying to calculate a total based on that field then you will have to find antoher way.
|< /\ '][' ( )
IP IP Logged
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Posted: 13 May 2011 at 6:01am
Is there an outher way?
Thanks :)
dkalsow
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 13 May 2011 at 7:27am
I have a numberic field that represents a negative value even though the value is not negative


I am having a hard time trying to figure out what you might be doing, so here is a possible solution:

right-click --> format field --> Number tab --> select how you want it to be displayed.

If you are using (123) to denote negative 123, then that should do the trick.

Edited by Keikoku - 13 May 2011 at 7:28am
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 13 May 2011 at 7:28am
Only thing I can think is to have two fields, one as the display and one that you base the calculations off of. So the display string will be {@displaynumericfield} which could be the formula above. Then put the actual field {table.numericfield} on the same line, but suppressed so it doesn't display and use that for the calculations.

Edited by FrnhtGLI - 13 May 2011 at 7:28am
|< /\ '][' ( )
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 13 May 2011 at 7:31am
I believe he is just trying to display a value, such as 123 as (123), but without (123) being considered a negative number. So, as I understand it, a negative number would display as (-123).
|< /\ '][' ( )
IP IP Logged
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Posted: 13 May 2011 at 8:36am
Thanks for all of the suggestions.  I ended up creating a formula field to take the orginal field and muliply it by negative one.
 
 
Thanks :)
dkalsow
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 13 May 2011 at 11:29am
My understanding is that in 2008 you can use the Format Field to tell it to "Use Accounting Format" and select "Reverse Sign For Display" and it will show as negative but still be treated as positive.Doing it this way uses the default settings on your computer so you'll have to set them the way you want it to show.


Edited by CircleD - 13 May 2011 at 11:30am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum