Crystal Reports test for 'record not found' in formula

i'm checking 2 columns in formula and want to know when there isn't a matching employee id.
i.e.  staff.emp_id = whmis.emp_id
If there isn't match then I want to indicate in formula 'unmatched record'
what is best method ?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Why wouldn't there be a match?

Is the report joining 2 tables with a left outer join?
In that case you need to use ISNULL

    If IsNull({whmis.emp_id}) then
        "No matching id "

guinnieAuthor Commented:
If there is a row in Whmis and not Staff then it has been incorrectly entered in another application.

So, I would compose the left outer join in 1) add command  or 2) link tables in database expert ?
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
If this is not about a join but about simple logic, then the following formula should work:

IF {staff.emp_id} = {whmis.emp_id} Then "" ELSE "Unmatched Record"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You can do It either place.  Whichever is more comfortable for you.

IN your example just change the field being tested to the other ID field.

If the value is NULL you have to test for NULL before using the field in the rest of the formula.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.