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

Multiple COUNTS on the same report. 1

Status
Not open for further replies.

MisterC

IS-IT--Management
Apr 19, 2001
501
US
I'm new with Crystal and am trying to create a report to show turnover percentages by location- (Turnover % = # of employees terminated during the year / Active employees at the end of the year * 100)

Something like:
Code:
    [blue]
   LOCATION        TERMINATIONS    ACTIVE     TURNOVER %
     01                120          235          51 %
     02                 98          150          65 %
     etc...
    [/blue]

The relevant fields in the database are:
E_LOCATION (Location Number
E_SSN (Employee SSN)
E_STATUS (A or T - Active or Terminated)
E_TERMDATE (Date Terminated)
E_HIREDATE (Date Hired)

To get the "TERMINATIONS", I need a [blue]Count[/blue] of E_SSN with E_TERMDATE > 1/1/03 and < 12/31/03.
To get ACTIVE at the end of the year, I need a [blue]Count[/blue] of E_SSN with a hire date < 12/31/03 and E_TERMDATE = null or > 12/31/03.

My questions: How do I get Termination Count and Active Count on the same report? Do I need a sub-report? If so, can I still do the calculation necessary for Turnover %?

Thanks for your help!
 
@terminations
If {E_TERMDATE} > date(2003,1,1) and < date(2003,12,31) then 1 else 0

Perform a simple summary on the formula, and there's your count. Do something similar for ACTIVE. Divide the 2 sums for the %.

Let me know if you have any questions.


Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
That is GENIUS! The only trouble I'm having is calculating the turnover %. If I use a calculated field, the values are incorrect. How can I just divide the sums of the terminated and active?
 
Nevermind, I found it. Thanks for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top