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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 8.5 - Finding duplicates and reporting non-duplicate records

Status
Not open for further replies.

JoseQuiervo

Programmer
Sep 25, 2002
57
US
Is there a way to combine duplicate records into a single record? Then to display all non-duplicate records the same way? First, I have field1 that has duplicates because the associated data has a high end and a low end. I'd like to combine the high end and low end and only show one field1.

(ie) -
field1 = 040124, field2 = 208, field3 = 90.8
field1 = 040124, field2 = 115, field3 = 72.7

what I want:
field1 = 040124, field2 = 208/115, field3 = 90.8/72.7
 
By "Field2 = 208/115" Are you saying you want to divide the 2 values, or list the 2 values using a slash "/" as a delimiter?



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
askdon@srhconsulting.com
 
Sorry, a slash in between. I can do the rest, I just need to know how to handle the duplicate issue.

Thanx
 
Click on the following threads

See Thread767-563497 on multiple items on one line or
Thread767-692825 if you are concerned with duplicates

-Larry
 
Those don't necessarily relate to me. All I need is how to display field1 if it's count is equal to one and leave blank when it's count is greater than 1. The rest I can do no problem.
 
I suggest that you group by your 'field1'. Within a group, you can use summary counts to see if it has one member of two, or more than two. You can also show maximum and minimum for the group.

To handle both duplicate and non-duplicate in one report would be tricky. Consider doing one of them as a subreport, in the report header or footer.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
If you are only dealing with two records per field1, then you could create formulas like the following:

//{@field2}:
if {table.field1} = next({table.field1}) then
totext({table.field2},0,"")+"/"+totext(next({table.field2}),0,"")

//{@field3}:
if {table.field1} = next({table.field1}) then
totext({table.field3},1,"")+"/"+totext(next({table.field3}),1,"")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top