Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Subtracting amount credit/debit Post Reply Post New Topic
<< Prev Page  of 4
Author Message
esther31
Groupie
Groupie


Joined: 19 Dec 2011
Online Status: Offline
Posts: 50
Quote esther31 Replybullet Posted: 13 Nov 2012 at 4:27am
perfect thank you :)
IP IP Logged
esther31
Groupie
Groupie


Joined: 19 Dec 2011
Online Status: Offline
Posts: 50
Quote esther31 Replybullet Posted: 13 Nov 2012 at 4:34am
Hello, back again sorry! the sum doesn't seem to be working properly.
 
A customer who has a debit of 9000 and a credit of 1000 is summing as 10000 rather than 8000, any ideas?
 
here's the formula:
 
//together
if {SRS_FDU.FDU_CORD}='C' then {SRS_FDU.FDU_AMNT} else {SRS_FDU.FDU_AMNT} *(1)
 
I am then doing a sum of this though this appears to be doing nothing!
 
thanks
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Nov 2012 at 4:37am
it is missing the negative sign at the end (-1)
 
if {SRS_FDU.FDU_CORD}='C' then {SRS_FDU.FDU_AMNT} else {SRS_FDU.FDU_AMNT} *(-1)
IP IP Logged
esther31
Groupie
Groupie


Joined: 19 Dec 2011
Online Status: Offline
Posts: 50
Quote esther31 Replybullet Posted: 13 Nov 2012 at 4:40am
If i add the negative sign it makes the comparison fall over as the SFE_CFEE record is not displayed as a negative number, is there a way to strip it our for this bit?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Nov 2012 at 4:47am
i dont understand your question.
you can use anything you want to display on the detail section (an diffetrnt formual field, the origianl field, etc.) but you have to use the formula with a negative 1 in order to be able to get the correct total.
IP IP Logged
esther31
Groupie
Groupie


Joined: 19 Dec 2011
Online Status: Offline
Posts: 50
Quote esther31 Replybullet Posted: 13 Nov 2012 at 5:02am
Sorry, i didn't explain very well. I only want records to show where the value of SFE_CFEE doesn't match the value of
//together
if {SRS_FDU.FDU_CORD}='C' then {SRS_FDU.FDU_AMNT} else {SRS_FDU.FDU_AMNT} *(-1)
 
when i add the minus to the formula all records are returned.
 
Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Nov 2012 at 7:03am

You are doing a group selection not a record selection.

First you have to pull all records.
Then you have to get the sum and the maximum for each group.
Then you can suppress or exclude entire groups based on the group values that you get.
 
 
IP IP Logged
esther31
Groupie
Groupie


Joined: 19 Dec 2011
Online Status: Offline
Posts: 50
Quote esther31 Replybullet Posted: 13 Nov 2012 at 9:38pm
Sorry, i dont understand, how do i do this?
IP IP Logged
esther31
Groupie
Groupie


Joined: 19 Dec 2011
Online Status: Offline
Posts: 50
Quote esther31 Replybullet Posted: 16 Nov 2012 at 4:04am
Can anyone help with this please?
 
 
IP IP Logged
<< Prev Page  of 4
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.023 seconds.