on 03-30-2022 3:17 PM
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!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
User | Count |
---|---|
74 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.