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

Design Help/Crystal 10

Status
Not open for further replies.

Tech2377

Programmer
Nov 13, 2007
81
Using Crystal 10.

I currently have a Employee List Report that groups employees by their postion.The majority of the information from the report is coming from the employee and postion tables.

Code:
Ex. Coordinator      Status
Smith                  PB
Gonzalez               FB
Jones                  T

My question is in my report I may have a certain position that has 2 employees in them, but their status is T for Terminated. If I do a select expert to exclude all T's, I lose the postion from the report. How can I keep it so that even if there are only T's for an position, the position still stays.
 
Use a left join FROM the position table to the employee table. Do not use selection criteria on the employee table. Instead, use conditional formulas like:

//{@Name}:
if {employee.status} <> "T" then {employee.name}

//{@Status}:
if {employee.status} <> "T" then {employee.status}

An alternative apporach would be to use a command as your datasource and set it up something like this:

Select employee.name, employee.status, position.title
from position left outer join employee on
position.ID = employee.positionID and
employee.status <> 'T'

The syntax/punctuation on tables/fields would be specific to your datasource. Insert a group on position.title.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top