sql server - SSRS date issue -


i have query used in ssrs reports summary , detail view in sql server 2008. problem having cannot date range calculate correctly. query:

declare @fromdate date  select     [abs] =     case when left(filename,2)='ba' 'bags'      when left(filename,2)='sx' 'socks'      else 'apparel' end, left(filename,(charindex( '_', filename, charindex( '_', filename)+1)-1)) [material], filename,  convert(varchar(50),delvd_dt,1) dd, fulfillment_type vw_delivery_log where(charindex( '_', filename, charindex( '_', filename)+1)-1)>0 , delivered_to_ftp <> 6 , fulfillment_type <> 'redrop' , (convert(varchar(50),delvd_dt,1) > @fromdate ); 

i have @fromdate variable datetime variable in ssrs. when add line @ before select statement "set @fromdate = '4/1/2013' query produces expected results, without query produces no results.

i have tried converting @fromdate variable date using convert command entering text variable instead of selecting date calendar.

i need able @ smaller segments of report due sheer size of dataset. month's worth of entries 250 pages of data.

any assistance appreciated.

if don't set @fromdate null , condition in clause fails. if want able work null @fromdate need that:

and (@fromdate null or delvd_dt > @fromdate) 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -