Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running total question? Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2011 at 7:48am

if you do not have any suppressed records then using a RT as

field to summarize=amount
type=sum
eval=use a formula...{EVENT_CASE.PAYMENT_COVERAGE_CODE} = 'LB'
reset=never
place in report footer
if that doe snot work you likely have hidden rows. I woulls need to see sample data without anything hidden to decide how to address that.
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 16 Mar 2011 at 9:33am
I tried that and it doesnt work. Basically i have 4 tables Event,Event_case,Bill_Sum,Recovery_Sum
 
and the joins are like this
Event.Event_id =Event_case.Event_id
Event_case.case_id(+)=Bill_Sum.case_id()
Event_case.case_id(+)=Recovery_Sum.case_id()
 
Basically the @Amount which is a formula i.e.(If isNull({BILL_SUM.SUM_PAID}) then 0 else
{BILL_SUM.SUM_PAID) is placed in the GroupHeader4 i.e. Event_Case.Case_id.
 
 Hence basically grouping the Amount once per Case_id.
 
Example: If i remove the amount from Groupheader and place it in Detail. It will show up the Amount 3 times.
 
Without anything hidden the data is like below
 
EVentid   Caseid   coverage   Amount
 
467          3458           LA           $3431
 
567            8888          LA           $1000
                   8888         LA           $1000
                   8888         LA            $1000
 
567              9999        LB            $2000
                    9999        LB             $2000
                    9999        LB              $2000
 
567             1111       LC                $3000
                   1111        LC                $3000
                  1111         LC                 $3000
 
What i need is
Total Amount of LA as 4431
 Total Amount of  LB  as 2000
                  and    LC  as 3000.
 
Makes sense now?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2011 at 10:03am
ahh...keep in mind crystal will always incude every row of data in its calculations unless you explicitly exclude them. Just suppressing something does not exclude them. From your sample you should be able to use the caseid as your cue
change your evaluate formula in the RT to:
{EVENT_CASE.PAYMENT_COVERAGE_CODE} = 'LB' and previous(table.caseid)<>table.caseid


Edited by DBlank - 16 Mar 2011 at 11:25am
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 16 Mar 2011 at 11:12am
 Worked perfect!!! Thanks for the knowledge.
IP IP Logged
<< Prev  Page  of 2
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