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
union all
select day + 1
from amonth
where day < @end
)
select amonth.day, count(val)
from amonth
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.
Oman88
Member
278 Points
170 Posts
details for a date and time in future.
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??
AL MUBARAK
Member
160 Points
112 Posts
Re: details for a date and time in future.
Nov 04, 2012 06:14 AM|LINK
Hi,
Can you please ellaborate your needs.?? how you want future date and time should be..?? what are the reports..??
Al Mubarak
Oman88
Member
278 Points
170 Posts
Re: details for a date and time in future.
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 ^_^
Ajay2707
Contributor
4465 Points
858 Posts
Re: details for a date and time in future.
Nov 05, 2012 06:32 AM|LINK
Hi Oman88,
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 union all select day + 1 from amonth where day < @end ) select amonth.day, count(val) from amonth left join #t on #t.DT = amonth.day group by amonth.dayAfter this sp you can merge your column with dateoutput. Now you whole data is set in db. you just through in report.
graciax8
Participant
751 Points
210 Posts
Re: details for a date and time in future.
Nov 05, 2012 06:35 AM|LINK
what output do you want? please post codes you have right now.
mycodepad.blogspot.com || TUMBLR
Oman88
Member
278 Points
170 Posts
Re: details for a date and time in future.
Nov 06, 2012 04:44 AM|LINK
can i do it by SQL expression???
Ajay2707
Contributor
4465 Points
858 Posts
Re: details for a date and time in future.
Nov 07, 2012 04:09 AM|LINK
Hi Oman,
see this,
http://forums.asp.net/t/1073788.aspx/1
http://www.reportsyouneed.com/crystal-add-command-vs-views/
or you can check your post
http://forums.asp.net/t/1856565.aspx/1?exception+in+passing+a+para+to+a+report