Project and Portfolio Management Practitioners Forum
Showing results for 
Search instead for 
Did you mean: 

Automation of dates for reports

Mike Ramberg
Super Collector

Automation of dates for reports

Hello, There has to be an easy way to do this and I am missing it...

I would like to run the workflow statistics report every Monday to show stats on a workflow form the past week. I can set the report to run every Monday, but how do I get the dates to go back one week? I tried changing the validation used for start and end dates, so that it uses SQL drop down list and grabs the date I want,
(select trunc(NEXT_DAY((sysdate - 14), 'Sat')), trunc(NEXT_DAY((sysdate - 14), 'Sat')) from dual)

but you still have to manually select the date to fill in the field. How can you set a report to run once a week and dynamicly grab last week's data with no user action?

Erik Cole
Honored Contributor

Re: Automation of dates for reports


One option is to copy the report, then change the command to execute a modified version of the kwflrpt_wf_stats.sql script (you would copy that script and change it to use your date SQL instead of the passed parameters).
Mike Ramberg
Super Collector

Re: Automation of dates for reports


I was starting to think about that also, I just was hoping that there was a simple way to get the report to pull auto dates from the validation. Thanks for the input!
//Add this to "OnDomLoad" event