D
DMUM via AccessMonster.com
hello i have a client who wants a report that shows all hours worked for each
employee for the period of 7 days. They only want to put in the end date and
have the report produce the other 6 dates. i.e Input of 3/27/2006 will show
dates of 3/27,3/26,3/25,3/24,3/23,3/22. I have no problem with this part - I
created 2 queries, the first is a standard select with parameter of date and
the second is a crosstab query with a criteria of Between [Date] and ([Date]-
7).
What I am having a problem with is that the client wants the report to show
all 7 days regardless of activity. So if a date Between 3/27 and 3/22 is a
Sunday or Holiday, it does not show up in the CrossTab query. Unfortuneatly
the client wants the dates as column headers so changing the column names to
Days as some of the posts suggest is not something I can take advantage of.
I have been creating Access Db;s for a while, but I am a long ways from being
anywhere close to most of you in this newsgroup, so if at all possible,
please be as explicit as possible in your response.
Just in case, here is the SQL View of my queries:
query 1: qRPT_TimeSheet1
PARAMETERS[Date]DateTime;
SELECT tblTimeSheet.Date,tblRimeSheet.EmpNo, tblTimeSheet.Name,tlkup.ClassNo,
tlkup.Rate,tblTimeSheet.Hours
FROM tblTimeSheet INNER JOIN tlkupClass ON tblTimesheet.Class.tlkup.ClassNo
TRANSFORM Nz(Sum(Hours),00 AS TotalHours
SELECT qRPT_TimeSheet1.EmpNo, qRPT_TimeSheet1.Name, qRPT_TimeSheet1.ClassNo,
qRPT_TimeSheet1.Rate
FROM qRPT_TImeSheet1
WHERE(((qRPT_TimeSheet1.Date) Between [Date] And ([Date]-6)))
GROUP BY qRPT_TimeSheet1.EmpNo, qRPT_TimeSheet1.Name, qRPT_TimeSheet1.ClassNo,
qRPT_TimeSheet1.Rate
PIVOT qRPT_TimeSheet1.Date;
I haven't even attempted to create the report yet.
Thank you in advance for your help
employee for the period of 7 days. They only want to put in the end date and
have the report produce the other 6 dates. i.e Input of 3/27/2006 will show
dates of 3/27,3/26,3/25,3/24,3/23,3/22. I have no problem with this part - I
created 2 queries, the first is a standard select with parameter of date and
the second is a crosstab query with a criteria of Between [Date] and ([Date]-
7).
What I am having a problem with is that the client wants the report to show
all 7 days regardless of activity. So if a date Between 3/27 and 3/22 is a
Sunday or Holiday, it does not show up in the CrossTab query. Unfortuneatly
the client wants the dates as column headers so changing the column names to
Days as some of the posts suggest is not something I can take advantage of.
I have been creating Access Db;s for a while, but I am a long ways from being
anywhere close to most of you in this newsgroup, so if at all possible,
please be as explicit as possible in your response.
Just in case, here is the SQL View of my queries:
query 1: qRPT_TimeSheet1
PARAMETERS[Date]DateTime;
SELECT tblTimeSheet.Date,tblRimeSheet.EmpNo, tblTimeSheet.Name,tlkup.ClassNo,
tlkup.Rate,tblTimeSheet.Hours
FROM tblTimeSheet INNER JOIN tlkupClass ON tblTimesheet.Class.tlkup.ClassNo
TRANSFORM Nz(Sum(Hours),00 AS TotalHours
SELECT qRPT_TimeSheet1.EmpNo, qRPT_TimeSheet1.Name, qRPT_TimeSheet1.ClassNo,
qRPT_TimeSheet1.Rate
FROM qRPT_TImeSheet1
WHERE(((qRPT_TimeSheet1.Date) Between [Date] And ([Date]-6)))
GROUP BY qRPT_TimeSheet1.EmpNo, qRPT_TimeSheet1.Name, qRPT_TimeSheet1.ClassNo,
qRPT_TimeSheet1.Rate
PIVOT qRPT_TimeSheet1.Date;
I haven't even attempted to create the report yet.
Thank you in advance for your help