Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Tough situation: supressing records Post Reply Post New Topic
Author Message
bets
Newbie
Newbie
Avatar

Joined: 05 May 2011
Location: United States
Online Status: Offline
Posts: 8
Quote bets Replybullet Topic: Tough situation: supressing records
     Posted: 30 Sep 2011 at 7:30am
Alright, here's the situation: I work for an organization that keeps track of our employees diagnosed disabilities. These employees may have more than one disability, and they are all listed in separate fields in a table. So, when I pull a report for these disabilities then Crystal will list all of them... duplicating the other fields as well. See below for an example:

0001  BROWN, JOE    MENTAL ILLNESS
0001  BROWN, JOE    HEARING IMPAIRMENT
0001  BROWN, JOE    TRAUMATIC BRAIN INJURY
0002  GREEN, JIM      CEREBRAL PALSY
0002  GREEN, JIM      OTHER PHYSICAL DISORDERS
0003  WHITE, ANNE   OTHER SEVERE DISABILITY

Etc, etc.

What I WANT is for it to show only one row and record for each employee, so that it looks like this:

0001 BROWN, JOE   MENTAL ILLNESS
0002 GREEN, JIM      CEREBRAL PALSY
0003 WHITE, ANNE  OTHER SEVERE DISABILITY

But for the life of me I can not figure out a suppression formula. Cry
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 30 Sep 2011 at 9:22am
suppress on the detail line if:

previous({table.employeenumber})={table.employeenumber}
and
previous({table.employeename})={table.employeename}


Not sure you need both, but I like to match two fields to make sure.
|< /\ '][' ( )
IP IP Logged
bets
Newbie
Newbie
Avatar

Joined: 05 May 2011
Location: United States
Online Status: Offline
Posts: 8
Quote bets Replybullet Posted: 02 Oct 2011 at 8:33am
This works perfectly, but for some reason it also suppresses my first row of data. I wonder why? Let me know if you have any suggestions for a fix, but otherwise thank you SO MUCH! You saved me. Smile
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 02 Oct 2011 at 9:48pm
It might work better if you just "Format the Field" and check the "Supress If Duplicated" box. While that formula is working for you somewhat it works better if you have more than 1 table and the link is causing the problem.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 04 Oct 2011 at 1:50am
throw:

not onfirstrecord and

in front of the original statement.
|< /\ '][' ( )
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