Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Dynamic parameters in data driven subscription

Author  Topic 

aarthirsk
Starting Member

5 Posts

Posted - 2014-01-02 : 02:18:11
I have a requirement that I want to make monthly subscription where for each month a mail should be sent to the recipients
taking the last month as a parameter.

For eg:If I create subscription on 2nd of every month and the current month is jan. Mail should be sent for the month of Dec which is previous month.This has to be repeated for each month.


Please help me with the SQL syntax..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-02 : 13:41:39
Set the date parameter in your report to default value of
=DateAdd(DateInterval.Month,DateDiff(dateInterval.Month,CDate("01/01/1900"),Now())-1,CDate("01/01/1900"))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -