If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

date filter, always want to pull last 7 days...

Started by generh6957, 03 May 2007 01:14:41 PM

Previous topic - Next topic

generh6957

I want to set up a report to run every monday, but only pull in data that has been added to the report in the last 7 days.  I ran the report on Mondy and can manually filter for the last 7 days, but I want it to run automatically (and e-mail to a distro list) and always pick the last 7 days.

larsonr

I'm assuming then you want for example:

On Monday 5/7 you want the data from April 30 thru May 6th?.

I am assuming you have some sort of time dimension centered around the idea of a day?

If so this is easy to accomplish.  Just have a copy of the report that is scheduled and contains a query where calendar date is between calendar date - 7 and calender date -1.   

Ex.   [Calendar_Date] between _add_days([Calendar_Date], -7) and _add_days([Calendar_Date], -1).  (My syntax may be off as I'm trying to do this from memory.

This hard codes the filter and this version of the report can be scheduled.

If you wish to set up other time filters like "last week", "last 28 days", "last 60 days", then you would create a value prompt that would conditionally set the filter.  Then you could set the default prompt on the job schedule to use one of those when scheduled.

These are just a few ideas you can try.  As far as dynamically doing it with two date prompts you would most likely then require the use of the SDK to have it dynamically schedule.