Print Page | Close Window

How to compare duplicate data in same string

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3654
Printed Date: 01 May 2024 at 10:16am


Topic: How to compare duplicate data in same string
Posted By: sashalewis1014
Subject: How to compare duplicate data in same string
Date Posted: 09 Jul 2008 at 12:20pm
I have a string that contains {address 1} line information. For record "B" where {secondary person} = "True". I need to return record "A's" ID if the value in (address 1) is the same and {secondary person} = "False". (This means they are the primary).
 
Any ideas?


-------------
Sasha Lewis
Database Development Manager
PKD Foundation
sashal@Pkdcure.org



Replies:
Posted By: saoco77
Date Posted: 22 Jul 2008 at 6:34pm
Is it one row of data or two??
If it's two rows try something along these lines...

if
(({table.secondary_person} = "True") and
({table.address}=previous({table.address})) and
(previous({table.secondary_person}) = "False"))
then previous({table.ID})
else "alternate condition"

I didn't test this to verify the logic...

Sarah






Print Page | Close Window