Print Page | Close Window

Removing Line Duplicates - 1 field

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22800
Printed Date: 02 May 2024 at 11:29am


Topic: Removing Line Duplicates - 1 field
Posted By: BoltzGirl
Subject: Removing Line Duplicates - 1 field
Date Posted: 18 Jul 2019 at 6:24am
I have been using the following in my section expert to remove records that have the same auth number and it works fine.

Not OnFirstRecord
and
Previous({HSD_AUTH_MASTER.AUTH_NUMBER}) = {HSD_AUTH_MASTER.AUTH_NUMBER}

I am working with a report today that I want to keep that logic based on the auth number and I have added the fax number to my report, that is sometimes null and I also want to remove those NULLS.

I tried this below with my simple mind thinking today.

Not OnFirstRecord
and
Previous({HSD_AUTH_MASTER.AUTH_NUMBER}) = {HSD_AUTH_MASTER.AUTH_NUMBER}
and
{PROV_ADDRESS_CONTACT.FAX_NUMBER} = "";

That doesn't work and won't do the last line to remove the NULL fax numbers, only removes the duplicate auth numbers.

How can I do both?

NOTE: Each auth has multiple lines and I don't want the auth number to repeat and I only want the line that has the fax number.

Appreciate the help in advance.


-------------
Always appreciate the help!



Replies:
Posted By: DBlank
Date Posted: 22 Jul 2019 at 3:15am
There are a few ways to possibly get what you want here.
Your existing formula is a suppression formula. You can either use a select condition to exclude all the rules with no fax:
ISNULL({PROV_ADDRESS_CONTACT.FAX_NUMBER}) OR {PROV_ADDRESS_CONTACT.FAX_NUMBER} = ""
but this could omit an entire auth if all the auths's rows have no fax identified.
Or you could group on the authID and display the max value of the fax number fro that group.



Print Page | Close Window