I need to schedule a birthday report, which I can do... but I want the report to email to someone in October, and contain employees with December birthdays... Any idea how I can do this? I want it to be automatic so that I do not have to change the date parameter each time etc... Thanks :)
Can't try this right now but thinking - Is this to notify your HR dept. of oncoming brithdays 2 months from now?
If it is something like that, you can set a filter in the report like:
extract(month,<Birthday Date>) = extract(month,current_date) + 2
Since extract results in an integer value, it should work. You can also base it off the
Parameter Date instead of the Current Date.
Forgot to add that if this works, you would need to check for year also along with the month -
extract(month,<Birthday Date>) * 10000 + extract(year,<Birthday Date>) = (extract(month,current_date) + 2) * 10000 + extract(year,current_date)
Haven't tested what will happen in November, December so just check it out, If required, use the 'If' function to resolve that..
I think that checking the year would be a bit excessive. It's a birthday anniversary report after all.
Instead of using an IF statement to check for Nov or Dec, put an _add_months(,2) before the extract. I believe the _add_months is a little less costly than a conditional statement.
extract(month,<Birthday Date>) = extract(month,_add_months(current_date,2) )