Please help with a Dynamic Crosstab Report

Manos39

Registered User.
Local time
Today, 06:25
Joined
Feb 14, 2011
Messages
248
I have this report based on Crosstab query, named "Rptsavvataepilogicross",
in that query five (5) fields are representing dates (Saturdays) over each month,
and take values either "1" or null, depending on weather some employee has worked
over Saturday.
In the Report those five fields are naturally ok for the month the report is done
but for some other month,the sourse of the field changes and need some help with that..

The SQL query "Qrsavvataepilogicross" is:

TRANSFORM Max(Qrsavvataepilogi.[ΧΡ ΣΑΒΒΑΤΟΥ]) AS [MaxOfΧΡ ΣΑΒΒΑΤΟΥ]
SELECT Qrsavvataepilogi.ΟΝΟΜΑΤΕΠΩΝΥΜΟ, Sum(Qrsavvataepilogi.[ΧΡ ΣΑΒΒΑΤΟΥ]) AS [ΧΡ ΣΑΒΒΑΤΟΥ]
FROM Qrsavvataepilogi
GROUP BY Qrsavvataepilogi.ΟΝΟΜΑΤΕΠΩΝΥΜΟ
ORDER BY Qrsavvataepilogi.ΟΝΟΜΑΤΕΠΩΝΥΜΟ, Format([ΗΜΕΡΟΜΗΝΙΑ],"dd/mm/yyyy")
PIVOT Format([ΗΜΕΡΟΜΗΝΙΑ],"dd/mm/yyyy");

can you help me with those five fields? and maybe if some month has four Saturdays what then?
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom