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

Highlighting Duplicates 1

Status
Not open for further replies.

h1tman911

IS-IT--Management
Aug 2, 2003
5
GB
Hi,

Newbie here, I am creating a report that has a field called serial number now hopefully every serial number should be different what I would like to do is if a duplicate serial number appears I would like it to be in bold or red just so it stands out hope that makes sense

cheers

Nick
 
Use the Previous() function to check if

Previous({SerialN}) = {Serial_N}

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
cheers,

would that check the last previous record or all prevous records ???

and how would I make the text red or bold.....???

I am a total newbie sorry about this



N!CK
 
right I got it working so it turns the text red however it only looks at the previous record and not all of them, how can I change it ????
 
Extend the logic to also use Next()
that way, you can get all duplicate rows to highlight.

Another option, is to group by SerialN and check if the count of records for that serial number is greater than 1.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
right cheers,

I don't really want to group by serial so how do I use the next() option ??? can you give me an example ????

at the moment I have:-

in the serial field/format field/font/color/x2

if previous ({serial}) = {serial}) then CRred

how do I introduce the next() command ????

many thanks

N!CK
 
Use something like:
----------------------------------------
if (previous ({serial}) = {serial})) OR
(Next({serial}) = {serial})) then CRred
----------------------------------------

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Cleaned up:
----------------------------------------
if (previous ({serial}) = {serial}) OR
(Next({serial}) = {serial}) then CRred
----------------------------------------

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top