Access 97 windows XP Pro
I have done a crosstab query for a report with 12 months as the columns and job codes as rows counting people as the value:
Link to view report so far
Ps the zeros in there so far came from an outer join so I could show Job codes with no transfers or leavers and I used rotate text active X for the headers.
I have 2 questions
1- How can I force "0" in the null values of the pivot so that my row totals in the report work? This is the crosstab (I cant seem to get IIF - IsNull to work!!):
TRANSFORM Sum(IIf([CODE]="L",[TOTAL],[TOTAL])) AS SumOfTOTAL
SELECT UNION.JOB
FROM [UNION]
WHERE (((UNION.JOB) Not Like "**Other - Non RetailPosition* *" And (UNION.JOB) Not Like "Dec*"))
GROUP BY UNION.JOB
ORDER BY [UNION].[MONTH] & '-' & [CODE]
PIVOT [UNION].[MONTH] & '-' & [CODE];
2- How can I assign 0,1,2,3,4,5,6,7 ,8,9,10,11,12 to my cross tab columns so that the report detail txt field names dont change each month when I increment the report 1 month.
if suggesting code please provide examples!
I have done a crosstab query for a report with 12 months as the columns and job codes as rows counting people as the value:
Link to view report so far
Ps the zeros in there so far came from an outer join so I could show Job codes with no transfers or leavers and I used rotate text active X for the headers.
I have 2 questions
1- How can I force "0" in the null values of the pivot so that my row totals in the report work? This is the crosstab (I cant seem to get IIF - IsNull to work!!):
TRANSFORM Sum(IIf([CODE]="L",[TOTAL],[TOTAL])) AS SumOfTOTAL
SELECT UNION.JOB
FROM [UNION]
WHERE (((UNION.JOB) Not Like "**Other - Non RetailPosition* *" And (UNION.JOB) Not Like "Dec*"))
GROUP BY UNION.JOB
ORDER BY [UNION].[MONTH] & '-' & [CODE]
PIVOT [UNION].[MONTH] & '-' & [CODE];
2- How can I assign 0,1,2,3,4,5,6,7 ,8,9,10,11,12 to my cross tab columns so that the report detail txt field names dont change each month when I increment the report 1 month.
if suggesting code please provide examples!
Comment