cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress (No Drill-Down) not removing all duplicates?

0 Kudos

Hi, Learning Crystal Reports here...

I am using Section Expert, going to details. Checking Suppress (No Drill-Down) and then entering this in the Formula Editor:

Previous ({qryAssetHistory.SerialNumber}) = {qryAssetSearch.SerialNumber}

I have used this formula before and it was worked, however with this report, there will be multiple examples of the same serial number. I have also tried using LotNumber which is another unique identifier to each asset with the same results. Is there a better/easier way to do this?

The interesting thing is that it does remove a lot of duplicates but not all. Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

This will only remove duplicates if the group and sort order has the records with the same SerialNumber next to each other. If, for example, the same serial number can appear in multiple groups with other records in between, this will not remove them. Also, turning on "Select Distinct Records" in the Database menu looks at ALL of the fields in a record so that won't necessarily get you what you're looking for either.

How is your data sorted and grouped? I may have some thoughts about how to do this.

Also, a good practice when working with "Previous" is to account for the first record in the dataset. For this you would do something like this:

Not OnFirstRecord and
Previous ({qryAssetHistory.SerialNumber}) = {qryAssetSearch.SerialNumber}

-Dell

0 Kudos

Thank you so much Dell, you are amazing! Turning on Select Distinct records plus the formula above worked. That may explain why I had success with "Previous" in the past, I probably had them sorted so the records were next to each other. Thank you for taking the time out of your day to help me, I greatly appreciate it!

Answers (0)