Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum Tonumber function not working Post Reply Post New Topic
Author Message
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Topic: Sum Tonumber function not working
     Posted: 15 Feb 2012 at 6:34am
Hello everyone,
 
I have a field that was made into a text field, but it's really a number field.  I have the ee_save formula as follows:
 
Tonumber({S_SRV_REQ.SR_OS})
 
I thought I could just take this formula and create another like the following:
 
sum({@ee_save}, {S_ORG_EXT_1.NAME})
 
Now, I'm getting some odd number that doesn't match what the sum should be.  Has anyone run into this problem?
 
Thank you.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Feb 2012 at 6:42am
your description seems to be an OK Process other than the value returned being not what you want.
Usually this means that there are duplicate rows of data.
sum({@ee_save}, {S_ORG_EXT_1.NAME})
will give you the sum of your ee_save formula for every row that is in the Name grouping.
It must be placed in a group section to be show the value for the group. It should always return the same number (per instnace of a group)
regardless if it is in a GH, GF or detail.


Edited by DBlank - 15 Feb 2012 at 6:44am
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 15 Feb 2012 at 10:26am
Thank you.  I figured out a way to handle this.  I had to declare a variable.  I learned a lot. 
 
Again...thank you for your help.
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