×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to calculate Period Begin Date in a Derived Field or other

How to calculate Period Begin Date in a Derived Field or other

How to calculate Period Begin Date in a Derived Field or other

(OP)
Hello,

I am using ADP PCPW V 5.1, and ReportSmith V 4.2.2002/Oracle.

Acording to ADP, "period begin" date is calculated and not stored, therefore, this date is not available in tables.  I'm thinking that a derived field can calculate period begin from either paydate-12 or period end - 13.  There is a catch.  We use "pay group" to identify the period end for hourly versus salary employees.  This field is just a radio buttion, which I believe triggers a calc during transmission of the payroll.  In text terms, this is what I'm trying to accomplish:
(Our hourly employees are paid one week in arrears, while salary employees are paid current.  For example, salary employee's period begin date is 03/16/08 and ends on 03/29/08 Hourly's begin date is 03/10/08 and ends on 03/23/08.  The pay date 03/28/08 is the same for both groups.)

RateType = H, paydate minus 18
RateType = S, paydate minus 12

Any assistance would appreciated.

RE: How to calculate Period Begin Date in a Derived Field or other

This should do it:

DECODE("JOB"."RATE_TYPE",
/* IF RateType = H, paydate minus 18 */
    'H',("AL_CHK_DATA"."PAY_END_DT" - 18),
/* ELSE RateType = S, paydate minus 12 */
    ("AL_CHK_DATA"."PAY_END_DT" - 12))

http://CharlesCook.com
Specializing in ReportSmith Training and Consulting

RE: How to calculate Period Begin Date in a Derived Field or other

(OP)
Hi Charles,

I believe your suggestion applies to a different version of ReportSmith as our tables start with "V_".  But actually, I don't think it matters since your suggestion is spot on and I actually continued working on the calc after I posted this question.  Here's what I came up with and hope you would be so kind to confirm:

 DECODE("REPORTS"."V_EMPLOYEE"."RATETYPE",'H' ,"REPORTS"."V_CHK_VW_HOURS"."CHECKVIEWPAYDATE"-18,'S',"REPORTS"."V_CHK_VW_HOURS"."CHECKVIEWPAYDATE"-12 )

Thank you for your support.

RE: How to calculate Period Begin Date in a Derived Field or other

Yes this looks good.  It is easier if you format it.

DECODE("REPORTS"."V_EMPLOYEE"."RATETYPE",
    'H' ,"REPORTS"."V_CHK_VW_HOURS"."CHECKVIEWPAYDATE" - 18,
    'S',"REPORTS"."V_CHK_VW_HOURS"."CHECKVIEWPAYDATE" - 12)

The only issue you will have is it will return NULL if it is not H or S for some reason.  If you look at mine I only check for H and ALL others get treated as an S.

Good Job !!!!

http://CharlesCook.com
Specializing in ReportSmith Training and Consulting

RE: How to calculate Period Begin Date in a Derived Field or other

(OP)
Hi Charles,

Thank you for the quick response. I'm still learning about properly using selection criteria, derived fields and grouping.  In fact, I'm giving some time to replicate checkview data, but it may be a moot issue since I'm planning on upgrading ADP, which means Crytal Reporting.  Therefore, you've been extremely helpful to users of this forum including myself.

Best regards,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close