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!

Group Selection 1

Status
Not open for further replies.

YANKRAY

Technical User
Nov 7, 2003
283
Using CR 10.0

I have a list of employees grouped by name.

I am trying to create a list of Employee's that do not have the Salaried Vacation 2005 Plan (or whichever PLAN selected). The report will have a list of values to choose from so the user can look up "who does not have" information.

Each line is a data entry line. My result looks like this:

NAME PLAN
Employee1 Salaried Vacation 2006
Employee1 Salaried Vacation 2004
Employee1 Comp Time Plan
Employee1 Sick Leave Plan

Employee2 Salaried Vacation 2006
Employee2 Salaried Vacation 2005
Employee2 Salaried Vacation 2004
Employee2 Comp Time Plan
Employee2 Sick Leave Plan

Employee3 Salaried Vacation 2006
Employee3 Salaried Vacation 2004
Employee3 Comp Time Plan
Employee3 Sick Leave Plan

Employee4 Salaried Vacation 2006
Employee4 Salaried Vacation 2005
Employee4 Salaried Vacation 2004
Employee4 Comp Time Plan
Employee4 Sick Leave Plan

I want my result to look like this:

NAME PLAN
Employee1 Salaried Vacation 2006
Employee1 Salaried Vacation 2004
Employee1 Comp Time Plan
Employee1 Sick Leave Plan

Employee3 Salaried Vacation 2006
Employee3 Salaried Vacation 2004
Employee3 Comp Time Plan
Employee3 Sick Leave Plan

This result will tell me that Employee 1 and Employee 3 did not have a Salaried Vacation 2005 Plan and also show me what they do have.

 
In SQL you might allow for this by using a NOT IN clause.


Within Crystal itself, which will be much slower, you might create a formula such as:

//@CntPlan
if {table.plan} = "Salaried Vacation 2005" then
1
else
0

Then add a clause to the Report->Selection Formulas->Group akin to:

sum(@CntPlan,{table.employee}) = 0

You could make the "Salaried Vacation 2005" a parameter and substitute the parameter in the formula.

-k
 
Worked Perfectly k, Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top