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

Exception Report 1

Status
Not open for further replies.

FireGeek21

Technical User
Dec 12, 2007
218
0
0
US
I need to do an "exception report" in which I have a PEOPLE table and a THINGS table. I am looking to return all PEOPLE that do not exist in the THINGS table at all and all PEOPLE that existed in the THINGS table but their records were stopped.

I can return all PEOPLE that have stopped records but am finding it difficult to return the PEOPLE that never had a record in the THINGS table.

Thoughts???

FireGeek
(currently using Crystal Reports XI with Lawson 9.01)
 
What table tells you a record is stopped?

Use a left join FROM the People table TO the Things table.
You should be able to use a record selection formula like this if the things table holds the stop field:

isnull({things.ID}) or
not isnull({things.stop})

Don't know what your fields are, so if this response is insufficient, explain how you determine a record is "stopped".

-LB
 
There are two fields START_DT and END_DT in the THINGS table. PEOPLE can have THINGS for a specific length of time. They can also have multiple different types of THINGS. So, if they still have a THING, the END_DT is empty or Date(1700, 01, 01). If they never had a THING, they don't have any entries in the THING table.

I will try your suggestion lbass and let you know the outcome.

Thanks

FireGeek
(currently using Crystal Reports XI with Lawson 9.01)
 
LB -

This solution works great. I guess sometimes I tend to venture down the "it must be a complicated solution" path vs the "keep it simple stupid" path!!

THANKS AGAIN!!!

FireGeek
(currently using Crystal Reports XI with Lawson 9.01)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top