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 strongm 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
Crystal Reports 10.0.

I have an employee report that groups employees as ACTIVE (A) and TERMINATED (T).

Employees are further grouped by the reason for Termination. (the A employees have a null value for Termination Reason).

I need to be able to give the user a parameter to select TERMINATED employees by specific Termination Reasons but also always have the ACTIVE employees listed also.

Can someone help with this selection?

Thanks,
Ray
 
In the Reason parameter, include a default value of "ALL".
Then, use the following record selection formula:

Code:
{status}="Active" OR 
({?Reason_Parameter}="ALL" OR {Reason} = {?Reason_Parameter})

hth,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I have a parameter to select specific Payroll types for this report.

When I added the Reason parameter mentioned by Ido, the selection for the Payroll type was ignored and I recieved all payroll groups.

Any ideas?

 
You need to expand the logic to include the payroll type. Just add an AND condition...

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I thought I had it covered. Here is my selection condition:
The PayrollName selection is already there.

How do I change the logic?

{@terminationdate} >= {?termdate} and
not ({PEMCO_CRYSTAL_ACTIVE_TERM_VW.CLASS_CODE} startswith "D7") and
{PEMCO_CRYSTAL_ACTIVE_TERM_VW.PAYROLL_NAME} = {?PayrollName} and
{PEMCO_CRYSTAL_ACTIVE_TERM_VW.HIRE_DATE}< {?HireDate} and
{@Active-Term} = "A" or
{?Reason} = "ALL" or
({PEMCO_CRYSTAL_ACTIVE_TERM_VW.TERMINATION_CODE_SINGLE}
= {?Reason}) and
{PEMCO_CRYSTAL_ACTIVE_TERM_VW.PLANT} = "30
 
Change it to:

{@terminationdate} >= {?termdate} and
not ({PEMCO_CRYSTAL_ACTIVE_TERM_VW.CLASS_CODE} startswith "D7") and
{PEMCO_CRYSTAL_ACTIVE_TERM_VW.PAYROLL_NAME} = {?PayrollName} and
{PEMCO_CRYSTAL_ACTIVE_TERM_VW.HIRE_DATE}< {?HireDate} and
(
{@Active-Term} = "A" or
{?Reason} = "ALL" or
({PEMCO_CRYSTAL_ACTIVE_TERM_VW.TERMINATION_CODE_SINGLE}
= {?Reason})
)
and
{PEMCO_CRYSTAL_ACTIVE_TERM_VW.PLANT} = "30"

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
This change gave me a blank report.
 
The {?Reason} parameter value was ALL.

The parameter is set up to allow multiple values. I put in the default ALL as you said and then selected it when running the report.

I also tried entering one of the other possible values and still got a blank report.
 
Start removing (commenting out) portions of the conditions until you find which one is causing the problem.

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
My bad - I added the PLANT = "30" when I was getting too many records. We have two differnent data sources that define PLANT in two different ways. (I used the wrong one).

I took out the
and {PEMCO_CRYSTAL_ACTIVE_TERM_VW.PLANT} = "30".

The report functions as advertised.

Thanks for your help and troubleshooting support.

Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top