AcctSolver
Technical User
I am building a report to return payroll data with one line per paycheck. There will be a column for each earnings type. It will be zero of the employee had no earnings of that type, and populated once if he did.
The data is structured with one line for every earnings type.
CHK#, CHKSEQ#, FILE#, NAME, GROSSPAY, REGERNING, EARNSCD, EARNSAMT
12133, 001, 101, MTR, 525.00, 400.00, 12, 15.00
12133, 001, 101, MTR, 525.00, 400.00, B, 30.00
12133, 001, 101, MTR, 525.00, 400.00, H, 80.00
I want my report to look like this:
CHK#, CHKSEQ#, FILE#, NAME, GROSSPAY, REGERNING, EARN12, EARNB, EARNH
12133, 001, 101, MTR, 525.00, 400.00, 15.00, 30.00, 80.00
The commas are just there to help make the field separations more clear.
In ReportSmith, the tool supplied with ADP Payroll, the syntax to get the regular earnings looked like this:
SUM(DISTINCT @NULLVALUE(REPORTS.V_CHK_VW_EARNINGS.REGERNING,0) )
To get the other earnings it looked like this
SUM(DISTINCT @NULLVALUE( @DECODE(REPORTS.V_CHK_VW_EARNINGS.EARNSCD,'12',REPORTS.V_CHK_VW_EARNINGS.EARNSAMT),0) )
What is the appropriate syntax in Crystal to achieve the same result? I will have as many lines as there are paychecks for all employees for a year. I will also have totals at the bottom of the columns.
The data is structured with one line for every earnings type.
CHK#, CHKSEQ#, FILE#, NAME, GROSSPAY, REGERNING, EARNSCD, EARNSAMT
12133, 001, 101, MTR, 525.00, 400.00, 12, 15.00
12133, 001, 101, MTR, 525.00, 400.00, B, 30.00
12133, 001, 101, MTR, 525.00, 400.00, H, 80.00
I want my report to look like this:
CHK#, CHKSEQ#, FILE#, NAME, GROSSPAY, REGERNING, EARN12, EARNB, EARNH
12133, 001, 101, MTR, 525.00, 400.00, 15.00, 30.00, 80.00
The commas are just there to help make the field separations more clear.
In ReportSmith, the tool supplied with ADP Payroll, the syntax to get the regular earnings looked like this:
SUM(DISTINCT @NULLVALUE(REPORTS.V_CHK_VW_EARNINGS.REGERNING,0) )
To get the other earnings it looked like this
SUM(DISTINCT @NULLVALUE( @DECODE(REPORTS.V_CHK_VW_EARNINGS.EARNSCD,'12',REPORTS.V_CHK_VW_EARNINGS.EARNSAMT),0) )
What is the appropriate syntax in Crystal to achieve the same result? I will have as many lines as there are paychecks for all employees for a year. I will also have totals at the bottom of the columns.