Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum Question Post Reply Post New Topic
Author Message
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Topic: Sum Question
    Posted: 14 Feb 2013 at 4:58am
If I am getting the sum of a record and need the output to be the opposite sign of whatever the sum may be how would I do this?

For instance if the sum is a positive number then I want it to output a negative number and if the sum is a negative number then I want it to show a positive number.

as always thank you in advance for any help
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Feb 2013 at 5:04am
multiply the result by (-1)
 
sum(field) * (-1)
or use the negate operator
 
-(sum(field))


Edited by DBlank - 14 Feb 2013 at 5:05am
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 14 Feb 2013 at 5:06am
awesome! that is what i was thinking but wasn't sure if it would be that simple.

thanks!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.047 seconds.