Create 2 RTs to get the 12 and 8 values then SUm those to RTS in a formula
name=Formula1 (or whatever you want)
field to summarize=CurrDed
Type=MAximum
Evaluate=Use a formula
MAXIMUM(PayEndDt,EmplId)=PayENdDt and DedType=2
Reset=Group level 2 (EmplID)
name=Formula2 (or whatever you want)
field to summarize=CurrDed
Type=MAximum
Evaluate=Use a formula
MAXIMUM(PayEndDt,EmplId)=PayENdDt and DedType=1
Reset=Group level 2 (EmplID)
Formula field is {#Formula1} + {#Formula2}
Place on group footer 2