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

Failure-Format Field Supress if Duplicate

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Problem in eliminating duplicates in detail line. Novice user; V. 8.5.0.217. Created simple report with 2 tables. Desire to eliminate duplicate detail of 2 columns/Fields of report. Have already checked Suppress if Duplicate under Common of Format Fields / did not eliminate duplicate printing; Saw this code in thread767-271216 "WhilePrintingRecords;
previous({Table.field}) = {Table.field}" and added that to report but still no success in eliminating duplicate data. Built another simple report and simply used Suppress if Duplicate under Common of Format Field and column/field of report appeared as desired with duplicate data removed. Any ideas on why the 2 methods of eliminating duplicate consecutive detail lines do not work in the first report?
Thanks for any assistance in advance Dorisciv
 
Hi,
if the joins are ok and you can't find any reason for duplicate records - I would use groups.

Regards,
Szyma
 
What is the difference between the two reports? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I started another report joining the same two files. Both times I used the Report Expert.

The reports take about 7 or 8 fields from 2 tables. The original report grouped on 3 items from the beginning.

Taking the clue that grouping seemed to be important here, I started the new report with no grouping. Suppress of duplicate field data worked correctly. I added the first group. Again, suppress of duplicate field data worked fine. I added the 2nd group. Again, suppress of duplicate field data worked fine. I added the 3rd group, and suppress of duplicate field data failed. I removed the 3rd group and all was well with duplicate supressing.

Now does anyone have any idea what is going on? Some secret about grouping?

The 2 fields for which the suppress if duplicate is desired, are not involved in the grouping. They are just string fields in Crystal Report's list. The 1st group field is defined as Sting of 4 characters. The 2nd is also a string and the 3rd one is just a string.

Using SQL Server database and none of the field involved are key fields on database.

Once again, thanks for help in solving this mystery.
 
When you use all three "group by" fields as columns on your report do you also get the duplication? If you are not using them when you are not getting duplicated then I suspect the problem has to do with data that looks like this:

col a col b col c
a a a
b a a
c a a

If you are only showing (or grouping) using columns b and c you will only get one of these record (a,a). If however you add column a as a field or group, you will get three..
(a,a,a),(b,a,a),(c,a,a).

I don't know if this is your problem, but it could help you look in the right direction.

Lisa
 
You do understand that suppressing the duplicates means suppressing only consecutive duplicates. In other words, if the third group splits the duplicates up into separate groups, they will no longer be suppressed. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks for the replies.

The duplicate data is consecutive in the report.
The 3rd group item does not split the data and is merely an alpha/numeric order field such as 1, 2, 3.
I find it strange that with the 3rd group removed and the same field used as the 3rd sort key, the suppressed duplicate data fields are still suppressed correctly.

Dorisciv
 
Weird one. Let us know if you figure it out. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Next step will be call CR tech support, I guess. I post anything I learn.

kenhamady-someone in my office just found your CR flaws list/thanks for making it available Dorisciv
 
Well it isn't exhaustive, but they are my favorites. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top