Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running Total Counter PLEASE HELP Post Reply Post New Topic
Author Message
gravytrain
Newbie
Newbie
Avatar

Joined: 10 May 2012
Location: Canada
Online Status: Offline
Posts: 5
Quote gravytrain Replybullet Topic: Running Total Counter PLEASE HELP
     Posted: 10 May 2012 at 7:44am
I have been trying desperatly for weeks to come up with a running total count for the following scenario: I am dealing with claims and I am trying to count when a certain set of claims (claims.codes.A) are billed with another set of claims (claims.codes.B) and they have the same "claims sequence code".
It is easy to visually count when one code from group A and one code from group B has the same "claims sequence code" by simply grouping by "claims sequence code".
But how can I develop a counter that will generate a total of where claims.codes.A and claims.codes.B are on the same "claims sequence code" throughout the report?
JG
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 May 2012 at 8:27am
can you post some sample data and how you want it counted?
IP IP Logged
amanda5615
Newbie
Newbie


Joined: 20 Apr 2012
Location: United States
Online Status: Offline
Posts: 17
Quote amanda5615 Replybullet Posted: 10 May 2012 at 8:27am
If I understand correct, you could create a formula where if ClaimA = ClaimB then "Y" else "N", Then do a count of the number of "Y"s
IP IP Logged
gravytrain
Newbie
Newbie
Avatar

Joined: 10 May 2012
Location: Canada
Online Status: Offline
Posts: 5
Quote gravytrain Replybullet Posted: 11 May 2012 at 7:12am
Thank you so very much for offering some help (what a great forum). Here is some sample data that I have already "grouped" by CLAIM SEQUENCE CODE:


CLAIM      SERVICE DATE     CLAIM SEQUENCE CODE
          
CODE.A     09.04.2011     1308801
CODE.B     09.04.2011     1308801
          
CODE.A     10.04.2011     1308804
CODE.C     10.04.2011     1308804
CODE.A     10.04.2011     1308804
          
CODE.B     11.04.2011     1816525
CODE.A     11.04.2011     1816525
CODE.D     11.04.2011     1816525
          
CODE.C     04.04.2011     1816539
CODE.B     04.04.2011     1816539
CODE.D     04.04.2011     1816539
          
CODE.A     08.04.2011     1816532
CODE.C     08.04.2011     1816532
CODE.C     08.04.2011     1816532
CODE.D     08.04.2011     1816532
CODE.D     08.04.2011     1816532

So what i would be trying to COUNT is the number of distinct Claims Sequence Codes (right column) that have a CODE.A and a CODE.B in the claim.

Sincerely appreciate the help!
JG
IP IP Logged
gravytrain
Newbie
Newbie
Avatar

Joined: 10 May 2012
Location: Canada
Online Status: Offline
Posts: 5
Quote gravytrain Replybullet Posted: 11 May 2012 at 7:14am
I have tried formulas like that but unfortunately these are each detail lines and they are not on the same line. They are in the same grouping because the CLAIM SEQUENCE CODE is the same.
JG
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 May 2012 at 7:47am
group on claim sequence code
create 2 'flag formula
//flaga
if table.claim= 'code.a' then 1
//flagb
if table.claim= 'code.b' then 1
sum each at the group level
sum(@flaga,table.claimsequencecode)
sum(@flagb,table.claimsequencecode)
 
now create a Running Total to get you count
name=A_Bcount
field to summarize=claimsequencecode
type of summary=distinctcount
evaluate=use a formula
 
sum(@flaga,table.claimsequencecode)>0 and
sum(@flagb,table.claimsequencecode)>0
 
reset=never
place in report footer
 
IP IP Logged
gravytrain
Newbie
Newbie
Avatar

Joined: 10 May 2012
Location: Canada
Online Status: Offline
Posts: 5
Quote gravytrain Replybullet Posted: 28 May 2012 at 8:09am
I might be coding something incorrectly but the problem is there could be 2 code.A in one group. Unfortunatley i don't think it is possible to total just looking at the grouping. Thanks for the help!
JG
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 May 2012 at 3:30am
You use a distinctcount of the field in the Running Total
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