Great, lets start with a power point I did on Database grouping and PCPW.
Create a new report following the steps in the power point.
In the normal Selection Critera (not the database grouping selections) put a selection for your company code and another one for the year.
Create a SQL Derived Field for code K call it CODE_K:
SUM(DECODE("REPORTS"."V_CHK_VW_DEDUCTION"."CHECKVIEWDEDCODE",
'K',"REPORTS"."V_CHK_VW_DEDUCTION"."CHECKVIEWDEDAMT",
0))
Create a SQL Derived Field for code 14 call it CODE_14:
SUM(DECODE("REPORTS"."V_CHK_VW_DEDUCTION"."CHECKVIEWDEDCODE",
'14',"REPORTS"."V_CHK_VW_DEDUCTION"."CHECKVIEWDEDAMT",
0))
Create a SQL Derived Field for code 11 call it CODE_11:
SUM(DECODE("REPORTS"."V_CHK_VW_DEDUCTION"."CHECKVIEWDEDCODE",
'11',"REPORTS"."V_CHK_VW_DEDUCTION"."CHECKVIEWDEDAMT",
0))
In the Database Grouping Selection Critera add 3 new critera
Derived Field Code_K is not equal number 0
Derived Field Code_14 is not equal number 0
Derived Field Code_11 is not equal number 0
At the top of the Database Grouping Selection Critera change the ALL to ANY
The power point had you make CheckViewChkSeq#,CheckViewPayroll# and CheckViewWeek# "Include In Report" Now make them "Exclude From Report" you don't need them for this report.
The power point had you make CheckViewYear# "Include In Report" Now make it "Query Only" You only need it for your selection critera.
This should get you very close. Let me know how it goes because I am doing this from memory. I don't have access to PCPW right now. We can fix the glitches as we go.
CharlesCook.com
Specializing in ReportSmith Training and Consulting