andreadd
MIS
- Jan 15, 2008
- 67
CR2008 / Oracle 11g view.
I have beent asked with writing a timesheet report. I need this report to pull data from a view. the problem that I am having is getting the report to display just a single day. So if i am running the report on thursday may 17th - the data displayed is from 5/11 to 5/17 and then shows up in corresponding date areas on the report - so 5/11 only shows 5/11 data.
so it would look something like this:
employee Friday 5/11 Saturday 5/12 Sunday 5/13
Joe Schmoe start 9:00 start 10:30
end 5:00 end 6:00
on my main report i have a bunch of formulas to get the date/day labels that look like this:
"Saturday" & Date(DateAdd("w", (-DayOfWeek ({mydatetimefield},7 )), {mydatetimefield})) + 1
i wouldnt mind cleaning this up but have been stumbling on it. the above appears to be very stable.
i figured it would be cleanest (and safest) to do the actual data display via subreports that i have placed in a group header on employee - one for each day. while i have no probs digging up the start/end times and employee names, my issue is that the data displayed isnt corresponding to the date. I am not right fully 'getting' how to take that particular dayofweek and telling the subreport that it's job is for that date and only that date. im not very familiar with how dayofweek works of other functions like dateadd. I did get my mitts on LBass' fabulous calendar report but when I tried to add the SQL expression for dayofweek in the subreport, it wouldnt work. got msg about server not being able to gather data. when i looked under date functions, it wasnt a choice. I'm assuming the SQR view is what decides what it can and cant see.
i'd appreciate the help - and thanks in advance
I have beent asked with writing a timesheet report. I need this report to pull data from a view. the problem that I am having is getting the report to display just a single day. So if i am running the report on thursday may 17th - the data displayed is from 5/11 to 5/17 and then shows up in corresponding date areas on the report - so 5/11 only shows 5/11 data.
so it would look something like this:
employee Friday 5/11 Saturday 5/12 Sunday 5/13
Joe Schmoe start 9:00 start 10:30
end 5:00 end 6:00
on my main report i have a bunch of formulas to get the date/day labels that look like this:
"Saturday" & Date(DateAdd("w", (-DayOfWeek ({mydatetimefield},7 )), {mydatetimefield})) + 1
i wouldnt mind cleaning this up but have been stumbling on it. the above appears to be very stable.
i figured it would be cleanest (and safest) to do the actual data display via subreports that i have placed in a group header on employee - one for each day. while i have no probs digging up the start/end times and employee names, my issue is that the data displayed isnt corresponding to the date. I am not right fully 'getting' how to take that particular dayofweek and telling the subreport that it's job is for that date and only that date. im not very familiar with how dayofweek works of other functions like dateadd. I did get my mitts on LBass' fabulous calendar report but when I tried to add the SQL expression for dayofweek in the subreport, it wouldnt work. got msg about server not being able to gather data. when i looked under date functions, it wasnt a choice. I'm assuming the SQR view is what decides what it can and cant see.
i'd appreciate the help - and thanks in advance