sql - Pick which value to feed in second parameter in SSRS -


i have report 2 date: productcreateddate, productsolddate. user need able filter either on createddate or solddate not both. how can this? thinking of creating 3 parameters. first 1 give user option select date want filter on. example:

first parameter- pick date type: product created date product sold date second parameter based on first parameter value- start date (calendar form) third parameter based on first parameter value- end date (calendar form) 

let's user selects value product created date first parameter

then second , third (start , end date calendar) parameter should based on productcreateddate filter

any suggestion, on how this?

what have tried hoping work:

where (case when @type = 'created' productcreateddate between @startdate , @enddate end) or (case when @type = 'sold' productsolddate between @startdate , @enddate end) 

if have 3 parameters (datetype, startdate, enddate) can add ands , ors in where.

where (@datetype = 'created' , productcreateddate between @startdate , @enddate)       or (@datetype = 'sold' , productsolddate between @startdate , @enddate) 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -