Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Excluding Entire Group if combination of values Post Reply Post New Topic
Author Message
seweri
Newbie
Newbie


Joined: 21 Nov 2014
Location: United States
Online Status: Offline
Posts: 1
Quote seweri Replybullet Topic: Excluding Entire Group if combination of values
    Posted: 16 Mar 2017 at 3:48am
Good Morning all,

I am currently working on a crystal report that groups by patient account number. Under the group, the detail has charge code number. I am trying to exclude or suppress any patient account number that has both charges code numbers 87 and 89. The patient would have to have both 87 and 89 to be excluded, if the patient has only 87 or only 89 then the patient will still show in report. Please see below for an example

Patient155

89

81

83

87

80

Patient 156

87

80

81

Patient 157

87

89

80

82

In this example I would like to only exclude Patient 157 because all though Patient 155 and Patient 156 have either 87 or 89, Patient 157 has both charge code 87 and 89.

Please help.

Thank you
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2017 at 4:20am
create two 'flags' for your inclusion computation criteria

//flag87
if chargecode = 87 then 1
//flag89
if chargecode = 89 then 1

sum both of these at the client group level
use the result of both to exclude your group via group select criteria
NOT(SUM(@flag87,clientid)>0 and SUM(@flag89,clientid)>0)

Note group excluded items are still include in summary calculations so if you are doing other calculation you would need to make sure your conditions exclude them or use Running Totals.

Edited by DBlank - 16 Mar 2017 at 4:20am
IP IP Logged
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.030 seconds.