Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: subtotaling amounts Post Reply Post New Topic
Author Message
JCway
Newbie
Newbie


Joined: 10 Nov 2010
Online Status: Offline
Posts: 1
Quote JCway Replybullet Topic: subtotaling amounts
     Posted: 10 Nov 2010 at 5:17am
Greetings,
 
I'm an idiot. Ok now that we've gotten through the first problem perhaps helping with the second will start to remedy the first.  Wink
 
I'm not terrably familiar with crystal syntax and I am trying to create a formula that will total two amounts with two seperate descriptions for each. Basically people that pay on amount over that which is due create a seperate line in the database called 'overpayment'. I need to get 'Overpayment' to subtotal with the 'Interest Item- Interest' amount and for the report to only display a total interest amount. Currently the way around this is to simply change the name to display Interest rather than Overpayment.
 
//if {PaymentItem.description} = 'Overpayment' then 'Interest' else  {PaymentItem.description}
 
I'm not terribly happy as this shows two interest amounts on my report. So I'm guessing something like the following which needs a bit of help. 
 
 if {PaymentItem.description} = 'Overpayment' and if {PaymentItem.description}='Interest Item - Interest'
then (I want to add the  {PaymentItem.amount}'s for items with these two descriptions.) and (i would like the {PaymentItem.description}= 'Interest' for the new total)
else (I want to leave everything as is due to the fact that not all payments will be overpayments.)
 
Is this even feasible or trying to have my cake and eat it to?
 


Edited by JCway - 10 Nov 2010 at 7:26am
JC
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Nov 2010 at 6:13am
I do not totally understand your set up here  but you can conditionally sum whatever you want using Running Totals that use evaluation formulas
Example:
Name=Interest
Field to summarize={PaymentItem.amount}
Type = SUM
Evlauate = use a formula
PaymentItem.description} = 'Overpayment' and{PaymentItem.description}='Interest Item - Interest'
Reset=Never for a report total or on a group for sub totals at group levels.
Running Totals do not work in headers so you must place them in the detail section to see lkine item changes or in footers for totals
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