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

How to read Locale passed by Jasperreports in Chart Customizer?


dunham

Recommended Posts

(I am basing my question on this HARDCODED example from April 2016 and am seeking an updated, dynamic answer since the "bug" has been fixed - not having the locale available in the Customizer)
 
    /* -Hardcoded example */    getNumberInstance(Locale.US)); //"Locale.US" is hardcoded rather than using the locale set in the reportsdf[/code]
 
 
Goal: Pass Locale set in jasper reports to chart and read with chart Customizer.
 
- How do I properly read the Report Locale now that the bug of it not being available has been fixed (see here)?
 
 
 


Problem: In the Customizer Class (written in Java) this command does not contain anything: JRParameter.REPORT_LOCALE.
 
 public class AssetsChartMod implements JRChartCustomizer {          public void customize(JFreeChart chart, JRChart jasperChart) {                    /* ----> */     System.out.println( JRParameter.REPORT_LOCALE ); // PRINTS NOTHING[/code]
   
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...