Question

How can the locale be set that is used by the Eclipse plugin "Jaspersoft Studio" to execute reports?

There are messages files for locales like 'en' and 'pt', but my system is on 'de'. So on preview, I get a:

net.sf.jasperreports.engine.JRException: java.util.MissingResourceException: Can't find bundle for base name org/uci/opus/report/messages, locale de_AT

NB: In iReport there is a setting for the report locale (under options -> compilation and execution), but where is this setting in Jaspersoft Studio?

Was it helpful?

Solution

In order to solve this:

  • define the report class path:
    • create a folder in your JasperReports Project in the Project Explorer
    • move all resource bundles and the JRXML there.
    • right click on the folder and select Build path > Use as source path
    • when you run the report the MissingResourceException will be gone
  • if you don't have any custom parameters defined it might not be obvious where the locale can be changed:
    • open the report in preview mode
    • on the left side you will notice a bar with a little triangle (pin) on it: click on it, it will expand the input parameters panel
    • on the top you'll see a toolbar, the second icon from the left (Report Parameter) allows yoy to configure Max # of Records, Report Locale, Report Time Zone
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top