Scheduled Reports & User input in Prompts
Often when you schedule a report, you’ll use a “Current date” object to ensure the data returned is from the date the report was scheduled.
But sometimes you want your end users to be able to refresh this report and enter their own date parameters – but it is setup to use a current date object so that you don’t need to enter a date each time you schedule the report. How can we get the best of both worlds?
There are many solutions which usually involve some kind of universe work in the back end, but here’s a nice easy one which requires no universe work at all.
I’m using Island Resorts Marketing as an example, but you can use anything that includes a date object.
Create a query just returning the Reservation Date:
Then, in the query filters section, drag the same object in three times, and arrange it like so:
Make sure you setup the two prompts as Optional. This is very important or this process will not work – they have to be optional prompts! In the above example I’m using a hard coded date in the middle field, but this can just as easily be a Current Date object (there isn’t one in Island Resorts Marketing, and I’m too lazy to add one – sorry).
Now, test your report. Leave your prompt blank and you will return the hard coded date (or object if you have it setup):
Now, do it again but this time enter a date into your optional prompt:
There you have it – when you don’t enter a value it will use whatever you have in the middle date filter.
…and when you do, it will use whatever you enter into the prompt.
Therefore, when you schedule the report, you just leave the optional prompt blank to use the default from the middle filter. When users refresh the report, they can enter a date and it will return data for the date they enter.
Simple eh? You can apply this mechanism to anything, it doesn’t have to be dates.
Hope you find useful 🙂
Thanks for sharing informative simple scheduling process without complexity..It's really helpful.
it is giving correct value,showing error plz help
if date is not given,it has to show current date but it is showing error, find the error screen shot
You don't have a value in the centre prompt in the screenshot - it appears blank / null. Use the calendar selector to enter a date and try again.
YES,if don't have value it should return current date right?,,
it is not returning current date
No, you will need to create a "Current Date" object in your universe and specify this in the middle filter (EQUAL TO>OBJECT FROM THIS QUERY), if you want to default to the current date when no input is entered.
Hello Nitchel, thanks for the knwldge, i have a similar kind of request.. 🙂
Really Nice we have come up with the issue a number of times.Thanks for the awesome tip.
This is very helpful! Thanks for posting.
Great tip! Thanks for sharing it with us.