Date Parameters Not Updating For Scheduled Reports

4 posts, 0 answers
  1. OfficialCommunity
    OfficialCommunity avatar
    10 posts
    Member since:
    May 2006

    Posted 05 Dec 2018 Link to this post


      We have a number of reports configured to show sales data from last week, last month, last quarter, etc. The date parameters all work off of a CurrentDate = Now() expression, and extrapolate from there for the different time periods required (AddDays, AddMonths, etc). All of these work perfectly when used on-demand. However, if I set up a subscription/scheduled report, the date parameters don't seem to get refreshed. I made sure that the CurrentDate parameter was ordered as the first parameter to be run, but that didn't seem to make a difference. The report runs on the scheduled date and time, but the data that it's returning is not relevant.  Is there any way to make sure that those date parameters get refreshed before the scheduled report runs?



  2. OfficialCommunity
    OfficialCommunity avatar
    10 posts
    Member since:
    May 2006

    Posted 05 Dec 2018 in reply to OfficialCommunity Link to this post

    I should also mention that all parameters are configured to AutoRefresh = True as well.
  3. Todor
    Todor avatar
    321 posts

    Posted 10 Dec 2018 Link to this post

    Hi Travis,

    I tested the described scenario with a simple report (attached - DateTimeNow.trdp) displaying the values of two report parameters, the first one (CurrentDate) with value "=Now()", the second (PastMonth) with value depending of the first parameter "= AddMonths(Parameters.CurrentDate.Value, -1)".
    I uploaded the report in the report server and scheduled a task to send the report daily. The report was rendered with the correct Date values - both when send as scheduled, and when run from the "Execute" button of the Report Server Manager.

    The report parameters are evaluated early in the report processing stage - check Report Life Cycle. The value of the parameter will be set according to its assigned Expression. The Now() function will get the current Date/Time, hence on each execution the CurrentDate parameter should have a fresh value.

    In scheduled tasks we do not use caching, hence I exclude also this possibility.

    If the problem persists consider opening a support ticket where to attach a sample runnable report reproducing the issue so that we may investigate locally.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  4. OfficialCommunity
    OfficialCommunity avatar
    10 posts
    Member since:
    May 2006

    Posted 11 Dec 2018 in reply to Todor Link to this post

    Thank you Todor for your reply. Respectfully, your example doesn't encompass our issue.  Your PastMonth parameter is going to be correct because nothing has changed.  If you were to use a Yesterday expression, or LastWeek, you may see our issue. Or, you'd have to wait until the current month has changed, and then look at the values being returned in the scheduled report. 

    For the time being, we have amended our SQL query to calculate the specific date ranges needed for our reports. I will create a sample report and upload to a support ticket for further investigation.


Back to Top