Greetings!
I have a reporting question. I'm attempting to schedule an SSRS report that gives me 24 hrs worth of data as follows:
2am Day 1 through 2am Day 2
I've tried using DayRunDate -1 for the start and RunDate for the end. However when I get the report output, it actually came through:
Midnight Day 1 through Midnight Day 2
My plan was to schedule it to run at 2am on Day 2 so that it would respect the relative start time but it doesn't want to do that. Anyone know a way to accomplish this?
Thanks!
Jenny, UMS
Hi Jenny,
I'm not sure there is much you can do to alter the way that the report scheduler service is functioning, but you could get around the problem by adding some code into the SQL SP behind the report that would modify the submitted starting and ending dates to default to switch to 2:00 am if midnight is submitted.
Something like:
DECLARE @start_dt DATETIME = '2014-01-01 00:00:00' SELECT @start_dt SELECT @start_dt = CASE Datepart(hh, @start_dt) WHEN 0 THEN Dateadd(hh, 2, @start_dt) ELSE @start_dt END SELECT @start_dt
That's a clever idea! I'll test that out. Thanks, Paul!