Dynamic date parameters in a SQL Server Reporting Services 2008 R2 subscription

  • Hi SSRS Team,

    I have a SQL reporting services report that takes date parameter (I have two parameters as StartDate (FromDate) and EndDate (ToDate). I want to create a subscription to the report with dynamic date parameters that will run each mid-night and show the data for the day prior. For example, DateAdd("d",-1,Today()).

    Could anyone please advise me what the dynamic date parameters for this subscription would be? Thanks.

    • This topic was modified 1 year, 9 months ago by  tim.hortons.
    Attachments:
    You must be logged in to view attached files.
  • (It's been a while since 2008 R2 and I don't recall everything that has changed.  I know my recommendations work on 2016.)

    I think you have two options...

    1. Make your subscription "data driven", add a SQL query that calculates your dates, and then pull those dates in to populate your parameters.
    2. Update your report so that the date parameters have default values using an expression (like you have in your OP), and then set the subscription parameters to use the report's default values.

    Let me know if that doesn't work or make sense.

    🙂

    "When it comes to report design and development, I have a list of pet peeves a mile wide. You might think the list would be a mile long, but I like to turn it on its side, sharpen the end, and poke people with it." - Me

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply