Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 07, 2012 04:09 AM by Ajay2707
Nov 04, 2012 05:12 AM|LINK
i want to generate a report where the details are related to future date and time.
how i can do that??
Nov 04, 2012 06:14 AM|LINK
Can you please ellaborate your needs.?? how you want future date and time should be..?? what are the reports..??
Nov 04, 2012 07:04 AM|LINK
it is a report shoing the shift details for each employee
the details should be related to the coming day not in the past one.
i hope that it is clear ^_^
Nov 05, 2012 06:32 AM|LINK
For your need , you make a sp which gives you the data. I'll show you as
select cast('05 jan 2011' as datetime) as DT, 1 as val into #t
union all select CAST('05 jan 2011' as datetime), 1
union all select CAST('29 jan 2011' as datetime), 1
declare @start datetime = '01 jan 2011'
declare @end datetime = dateadd(day, 29, @start)
;with amonth(day) as
select @start as day
select day + 1
where day < @end
select amonth.day, count(val)
left join #t on #t.DT = amonth.day
group by amonth.day
After this sp you can merge your column with dateoutput. Now you whole data is set in db. you just through in report.
Nov 05, 2012 06:35 AM|LINK
what output do you want? please post codes you have right now.
Nov 06, 2012 04:44 AM|LINK
can i do it by SQL expression???
Nov 07, 2012 04:09 AM|LINK
or you can check your post