Sharad
Sharad

Reputation: 3548

Pass Today's Date as Parameter in Scheduled JasperReports Server Report

I have a JasperReports scheduled in Jasper which takes the FromDate and ToDate where FromDate is fixed and I need to pass Today's date as ToDate in Integer format.

Report is running fine when I run manually on JasperReports Server and it is taking today's date as ToDate parameter. Below is the query for parameter which I have written in Jasper while creating parameter:

SELECT date_format( now(), '%Y%m%d') AS today

But when I schedule the report it seems ToDate input control is not passing the Today's date and I always get the date when I scheduled the report as ToDate.

I found few links for the similar issue but still I could not fix, need your help.

Dynamic Date Parameters for Scheduler in JasperServer

Upvotes: 1

Views: 1722

Answers (1)

user10969277
user10969277

Reputation: 11

Maybe the following could solve the problem:

SELECT date_format( now(), '%Y-%m-%d') AS today

Upvotes: 1

Related Questions