I'm working on a pay history report and having some difficulty with a sub report. The report lists pay history by check of each employee and the sub report lists all of the Benefits, Deductions and Contributions on a paycheck.
My data looks like this:
Check_No Emp_ID Type Amount Bended_code Base_Amt
1000 1 C 262.29 aetna 0.00
1000 1 C 27.00 dpt 0.00
1000 1 B 8.75 life 0.00
1000 1 D 77.43 ss 1248.92
1000 1 B 77.43 ss 1248.92
1001 3 C 263.25 aetna 0.00
1001 3 C 15.00 dpt 0.00
1001 3 B 77.43 ss 1248.92
1001 3 D 77.43 ss 1248.92
It's linked to my main report by check number and what I get is this:
Check
1000
Code Ben Ded Cont Base_Amt
aetna 0.00 0.00 262.29 0.00
dpt 0.00 0.00 27.00 0.00
life 8.75 0.00 0.00 0.00
ss 0.00 77.43 0.00 1248.92
ss 77.43 0.00 0.00 1248.92
---------------------------------------------------------------
Check
1001
Code Ben Ded Cont Base_Amt
aetna 0.00 0.00 263.25 0.00
dpt 0.00 0.00 15.00 0.00
ss 0.00 77.43 0.00 1248.92
ss 77.43 0.00 0.00 1248.92
Lines with both a B (benefit) and D (contribution) for the same ben/ded/cont code are on separate lines. I'd like to combine it onto a single line like this:
Check
1000
Code Ben Ded Cont Base_Amt
aetna 0.00 0.00 262.29 0.00
dpt 0.00 0.00 27.00 0.00
life 8.75 0.00 0.00 0.00
ss 77.43 77.43 0.00 1248.92
---------------------------------------------------------------
Check
1001
Code Ben Ded Cont Base_Amt
aetna 0.00 0.00 263.25 0.00
dpt 0.00 0.00 15.00 0.00
ss 77.43 77.43 0.00 1248.92
If anyone can offer any pointers, suggestions or ideas to format this on a single line I'd really appreciate it. The data is in SQL and I can create views if it works better.
Thanks!