Question : Does SSRS Subscription allow parameters

I have a subscription that uses a parameter for the date and I just need to put in there todays date plus 30 days. Is this possible?

Answer : Does SSRS Subscription allow parameters

That's why the OR statement is in place.  It will evaluate both criteria and match either one.  You could put a default date of today's date in the EndDate parameter and the user could change it to something meaningful to them.  Change to where clause:

where o.actclass = 'OV' and
(o.apptdate between getdate() and @EndDate or
o.apptdate between getdate() and dateadd("d", @dateInterval, getdate()))
and not exists (select top 1  * from appointments a
where a.person_id = p.person_id and
(convert(datetime, a.appt_date, 101) between getdate() and @EndDate) or
convert(datetime, a.appt_date, 101) between getdate() and dateadd("d", @dateInterval, getdate()))
order by o.apptdate asc
Random Solutions  
 
programming4us programming4us