Posts Tagged ‘Scheduling’

Limiting Scheduled Reports Against Holiday Dates in JasperServer

A new feature added to JasperServer 5.1 is the ability to create a calendar that can be referenced as a list of dates on which to exclude sending scheduled reports.

For example, you may have a report of Cost of Labor data that is scheduled to be sent at the end of day at a time after your employees are clocked out. On any business day, you might want to compare your cost of labor to the sales made that day. However, you may not want to receive the email on closed days.

Currently, the ability to modify exclusion calendars is only available using the JasperServer REST 2.0 services. The API reference for this ability is located on the Jaspersoft Community site: Adding or Updating an Exclusion Calendar

So, using the Firefox plugin Poster, I made a PUT request to my local instance of JasperServer to add a calendar named ChristmasHolidays of Christmas and Christmas Eve dates for the next couple of years:

jasperserver-add-exclusion-calendar-poster

After clicking the POST button to submit the calendar to JasperServer, I receive an OK 200 Response:

jasperserver-add-exclusion-calendar-poster-response

Now, when I attempt to schedule a report, my ChristmasHolidays displays as an option to exclude report scheduling against when a reoccurring schedule type is selected:

jasperserver-add-exclusion-calendar-results

This feature is definitely more useful when including all of a businesses holidays because currently multiple calendars cannot be selected for exclusion when scheduling a report. Hopefully Jaspersoft will incorporate custom calendars in other parts of the application – specifically the ability to use custom calendars as an inclusion option, the ability to select multiple calendars for inclusion/exclusion, and integration into the date selector input controls within reports.

If you have any other ideas or good uses for this feature, please comment below!