Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: subtotal within a group Post Reply Post New Topic
Author Message
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Topic: subtotal within a group
     Posted: 13 Mar 2014 at 4:39am
My report contains Acct# which is grouped, ID# which is grouped then a Charge Amt which is summed on the amt of associated with the ID#.  I have the data populating in group footer 2 but cannot get the tot field to do what I need it to do.
I want:
Acct     ID           Charge Amt       Tot
111      2000       120.00              130.00
111      9999         10.00              130.00
777      3000        400.00             400.00
888      1234        100.00              110.00
888      9999          10.00              110.00
 
 
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Mar 2014 at 6:46am
can you please show your ungrouped row level data
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 13 Mar 2014 at 8:46am
ungrouped
 
Acct   ID       Charge Amt
111   2000      60.00
111   2000      60.00
111   9999      10.00
777   3000    400.00
888   1234     100.00
888   9999       10.00
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Mar 2014 at 10:20am
you can use shared variales or Running Totals
Th RT fothe charge would be
name=chargeSum1
field to summarize = charge amount
type=sum
evaluate=on change of field - select ID
reset= on change of  (account)
this will get you the correct value in the group footer
it cannot be displayed as a sum untial all of the records a read.
HTH
 
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 13 Mar 2014 at 3:53pm
This is not resulting correctly when and acct number appears mor than once.
It is giving me..
Acct   ID           Charge Amt   Tot
111    2000       120.00         120.00
111    9999         10.00         130.00
777    3000        400.00        400.00
888    1234        100.00        100.00
888    9999         10.00          10.00
 
When the account number is appearing more than once it should give the the total charge in on all the lines associated with the account number like this...
 
111   2000     120.00    130.00
111   9999        10.00   130.00
 
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Mar 2014 at 3:42am
to get what you want you would have to use sub reports or do the calculations before you pull them into the report (like using a stored procedure as your data source).
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