Adding Dynamic Date Range to Saved Reports

Modified on Wed, 18 Sep at 2:59 PM

Overview

   This article will detail how to set dynamic date ranges that adjust based on the current date in saved (memorized) reports.  


Caution: this is a fairly advanced procedure - if in doubt, please contact our support team at support@cloudretailer.com  or 888-267-7483 for billable/paid assistance.


Procedure

When you save a report by clicking on the bookmark link, you may have noticed that when you go back to that report at a later date, the date ranges in the report are still the same as they were on the day that you saved the report. They no longer update dynamically whenever you open the report. To change this behavior take the following steps:
  1. Find the saved report configuration by clicking on Reports in the sidebar then clicking on View existing report configurations.
    1. Search for the report title in the search field.
    2. The report configuration must be of the type "Link."
    3. Check the box to select the report configuration.
    4. Click the Edit Selected Report Configuration(s) button.

  2. Edit the URL of the saved report configuration.
  3. Click in the Url: text field and press Ctrl-A to select all and then Ctrl-C to copy.
  4. Open Notepad and paste the URL with Ctrl-V.
  5. Identify the Date values we need to change. The URL will have the slashes in the date value re-encoded to %2F. Spaces will be re-encoded to %20 and colons to %3A. Include the time along with the date if it appears. In the example below I have highlighted the date and time values. Notice that they appear shortly after the text "fromDate" and "toDate", and that they will be between Value= and &.
  6. Replace the Date values with one of the following values:
    1. DAYSPREVIOUS:X where X is a number, 0 being today, 1 being yesterday, 30 being 30 days ago, and so on.
    2. DAYSPREVIOUSEND:X the same as DAYSPREVIOUS, except the time will be set to 23:59:59 instead of 00:00:00.
    3. MONTHSPREVIOUS:X where X is a number, 0 being this month, 1 being last month, and so on. This will produce a date equal to the first day of the month. For example, if today is 8/21/2019, MONTHSPREVIOUS:1 will produce a date of 7/1/2019.
    4. MONTHSPREVIOUSEND:X where X is a number, 0 being this month, 1 being last month, and so on. This will produce a date equal to the last day of the month. For example, if today is 8/21/2019, MONTHSPREVIOUSEND:1 will produce a date of 7/31/2019.

  7. Below is an example of how to replace the date values so that the report will always open with a start date of the first day of the previous month and an end date of today.
  8. In Notepad, press Ctrl-A to select all and then Ctrl-C to copy.
  9. Go back to the Url: field of the saved report configuration and press Ctrl-A to select all and then Ctrl-V to paste. Click the Save button.
  10. Test the report. It should now open with the desired date range.
A similar method will work for Report Summaries.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article