Using Dynamic Formula Parameters in Report Manager Subscriptions

Posted on 2008-11-06
Last Modified: 2012-05-05
I have a situation where a user wants to subscribe to a report that takes a date range, with a start and an end date. They want to be able to have the report be able to run against a specific time frame for every subscription. So for example, the report would run every Monday, and show the data from the previous week. Another user would want the same report to run every Month, and show the previous Month. so if i have a paramater of Start Date and End Date, how could they put in a value to indicate this constantly moving date range.

Something like Start Date = Beginning of previous Month and End Date = End of previous Month, and every time the subscription fires, it recalculates the dates.

Any guidance appreciated.
Question by:Patrick_Schouten
    1 Comment
    LVL 9

    Accepted Solution

    Set the defauld values like this:
    Start Date
    =CDate(FormatDateTime(DateAdd("m",-1, DateSerial( Year(Today), Month(Today), 1 ) ),1))
    End Date  =CDate(FormatDateTime(DateAdd("d",-1, DateSerial( Year(Today), Month(Today), 1 ) ),1))

    =CDate(FormatDateTime(DateAdd("m",-1, DateSerial( Year(Today), Month(Today), 1 ) ),1))
    =CDate(FormatDateTime(DateAdd("d",-1, DateSerial( Year(Today), Month(Today), 1 ) ),1)) 

    Open in new window


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    How to increase the row limit in Jasper Server.
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now