Jasper Reports: Resources subfolder
Enable the functionality for JasperReport to get the auxiliary files as translation files, subreports, and images from the resources subfolder, see the images.
resources
subfolder :
files:
Implementation
This is linked to the implementation of custom classloader functionality in !452 and resources and classes are fetched and loaded from the FileRepository
.
In this ticket we implement a new FileRepositoryClassLoader extends ClassLoader
. It behaves to JasperReportServiceImpl.ResourceRepository
: it is configured with a base path (e.g. /reports/Crop/resources
).
Selecting the locale
The API call should use the current locale (from LocaleContextHolder
) by default, but we need to also add support to pass the target locale to the service. This way a user can generate a report in Spanish even if they are working in English.