Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

** Report NEEDS to show Duplicates **

Status
Not open for further replies.

Cherrel

Technical User
Dec 5, 2001
34
US
Hi All!!

It's been a long time since I have been back here. (I guess that means that Crystal Reports must be getting easier for me...)

I'm writing a report that displays Equipment Number (EQNUM) and Serial Numbers (SERNUM). (I need a report that displays all EQNUMS that have DUPLICATE Serial Numbers.) I do not want to surpress the duplicates, I want a report that shows all of the records that have duplicate Serial Numbers.

(CRYSTAL REPORTS 7.0)
*********************

*DATABASE*

EQNUM SERNUM
----- ------
ABC-123 aabbcc
BAC-221 ajsdje
zxc-098 aabbcc


**CRYSTAL REPORT**

EQNUM SERNUM
----- ------
ABC-123 aabbcc
zxc-098 aabbcc




Thanks ahead of time!!!
Cherrel. [mickey]
 
1. Create a group on {SERNUM}
2. Create a Running Total on {SERNUM}, summary type = Count, Evaluate For each record, Reset on Change of Group {SERNUM} and place the formula field on the detail line, suppressed.
3. In the Section Expert, for the Detail Line, click the X-2 button for Suppress (No Drill Down) and enter a formula to suppress unwanted lines, e. g.

IF OnLastRecord then
{SERNUM} <> Previous({SERNUM}
ELSE
{SERNUM} <> Next({SERNUM} and {#Count} = 1

This will display only records with duplicated {SERNUM} values.
 
Rogar

I like your approach but I might use a different formula to suppress unwanted data.

Really...what you want is to suppress an printing (header,details and footer) if there is more than one record in the group

So..I would group on {table.sernum} as you said but in the conditional suppress of the header, detail, footer sections I would put the formula

WhilePrintingPrecords;
count({table.EqNum},{table.sernum}) > 1

I think that will do it

Jim
 
IT WORKS GREAT!!!!

Thanks guys! The report shows the problems the data has and works great!

Cherrel. [chicken]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top