I have a crosstab query that views all the vacation days for employees between two dates parameter,
the column headings of the query is the all the dates between the parameters even if they are nulls
I need to design a report for that query where the headings to be dynamic for dates in the headings and doesn't exceed 31 days.
Expand|Select|Wrap|Line Numbers
- PARAMETERS d DateTime, b DateTime;
- TRANSFORM Sum(Vaclist.Period) AS SumOfPeriod
- SELECT Vaclist.EmpID, Vaclist.Vactype, Sum((nnz([period]))) AS Total
- FROM (qryEmployeeWorkDates LEFT JOIN Vaclist ON (qryEmployeeWorkDates.DateOfPeriod = Vaclist.VacDate) AND (qryEmployeeWorkDates.EmpID = Vaclist.EmpID)) LEFT JOIN tbl_VacType ON Vaclist.VacTypeID = tbl_VacType.VacTypeID
- WHERE (((qryEmployeeWorkDates.DateOfPeriod) Between [d] And [b]))
- GROUP BY Vaclist.EmpID, tbl_VacType.Vactype, Vaclist.Vactype
- PIVOT qryEmployeeWorkDates.DateOfPeriod;
I really appreciate your help