Jump to content
We've recently updated our Privacy Statement, available here ×

Jasper server dynamic date parameters for reports scheduling


tugrul083

Recommended Posts

Hi, 

I have several reports that use weekly Start date and End date parameters. The goal is to have these reports scheduled and emailed to clients on weekly basis whilst allowing them to login and select their own dates when necessary. 

Default dates are calculated by Groovy scripts. Date calculations work fine; when you login to Jasperserver and open the report, they are always correct and reports run fine manually. 

However the reports scheduler gets stuck. I set the scheduler to start on a specific date (next Monday 00:05) and set the recurrence as Calendar type to repeat evert month, every Monday at 00:05. The problem is that although the scheduler works, it will ONLY use the current date parameters and will not refresh them on the second run. For example if I set the scheduler now, next Monday I will have the reports sent to my email with date inputs startdate: 3-11-14, enddate: 10-11-14. This is correct for the first run. However, all the upcoming weeks, it will use these specific parameters and will not refresh the dates.

I believe what I am looking for is VERY simple. I have my report calculate everything correctly and all I need from Jasperserver is to run it every Monday WITHOUT storing the input parameters. If it ONLY runs it, on cheduled time, all would be great but somehow scheduler stores the parameter values which are correct only at the date the scheduler is set!

I have been working on this for ages and am really annoyed I can't find a permanent, reliable solution. Any help would be greatly appreciated.

Regards,

Tugrul

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Good morning,

have you tried to schedule the report using relative dates. For example, if you need a week interval, you should try using TODAY and TODAY+7 or something similar when you schedule it. I'm not sure about, but it's the only workaround I can suggest.

Hope it helps.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...