Hi guys,
I am trying to schedule a report which has date prompt.
Current date is selected as default date while running in schedule. How can i make the report to pick the previous date while running in schedule and report should also support custome date while running manually?
Thanks in advance
Hi,
You can add a Filter to make sure that the Previous Day was selected. You can get the previous date by using Javascript.
http://www.ibm.com/developerworks/library/ba-pp-reporting-scripting_techniques-page634/
i don't think javascript will work for setting a default date prompt as javascript is executed when you run the report so that the html is displayed. prompting does not run the html, but it runs the queries in the background
what i would do is i would create the date parameter using the prompt macro and you could have something like #prompt('date_parameter', 'date', 'current_date - 1')#
this will set a default date for the parameter as current date - 1, so if you don't select anything if will default to this value
you can schedule the report and remember to uncheck the check box that says prompt for values
Thanks a lot Adik and Linhlv.
I try the below.
A flag is populated with the load date in the Database when the ETL load is done.
I brought that flag and date in the model and schedule it in event studio to run the report when the flag is Y and i pass the date(previous date) and its working.
I will try the macro and java script.