Reputation: 4934
I'm trying to set up a report using the scheduler with today's date as the input parameter. Is this possible?
I see you can set static value for the input parameter but cannot set it to now() or some variant.
Upvotes: 1
Views: 2542
Reputation: 4934
report parameter name is $P{Date}
I've set the default expression to
($P{Date} == null ? new Date() : $P{Date})
And it seems to work.
Upvotes: 2
Reputation: 1341
Sam, in your report, could you create a parameter with a default value of today's date (see Filtering on a Date Range: http://jasperforge.org/plugins/mwiki/index.php/Jasperserver/Filtering_on_a_date_range)? Then make it mandatory so JasperReports Server will choose the default value if no other input is given.
Upvotes: 0