• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1709
  • Last Modified:

Using Dynamic Formula Parameters in Report Manager Subscriptions

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.
0
Patrick_Schouten
Asked:
Patrick_Schouten
1 Solution
 
ErnariashCommented:
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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now