Topic: Dates for recurring report Posted: 01 Jul 2014 at 11:14am
Hi,
I am working on a report where I need to caputure all admitted patients on Friday @ 12:01am and discharged by Sunday @ 12:01am.
This report will be run on every Monday and it captures previous weekend data.I am not sure how to put it in select criteria so that the report can run on every Monday without changing dates.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 01 Jul 2014 at 12:55pm
As long at the run time is consistent then you could always use an the dateadd function for the beginning and ending dates, something like this dateadd("d",{DateField}, -3) and dateadd("d",{DateField},-1). You should to concatenate the time in. My brain just can't quite think how to do it at the moment.
lets say the run time is not consistent for example I ran this report on Wednesday instead of Monday how could I still able to get data for friday thru sunday ?
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 02 Jul 2014 at 5:44am
Nope. In fact I goofed. The only way it would work if I used a filter using the current date i.e., {Datefield} >= dateadd("d",currentdate, -3) and {Datefield} <= dateadd("d",currentdate,-2). This should be a close approximation (I did not consider the time of day) and it would have to be run on Monday. Do you have a way to schedule a report? I hope this gets you in the right direction.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum