767892214 Posted January 6, 2015 Posted January 6, 2015 Hello everybody.How can I use brazilian portuguese number formatting on when i output PDF by java ? Java source is here.public void JReportToPdf(java.lang.String pdfdir, java.lang.String japdir, java.lang.String xmldir, String xmlnode) { //Locale a = new Locale("POR"); Locale myLocale =new Locale("pt","BR"); //Portuguese Map parameters = new HashMap(); parameters.put(JRParameter.REPORT_LOCALE, myLocale); FileOutputStream os = null; FileInputStream reportStream = null; try { os = new FileOutputStream(pdfdir); reportStream = new FileInputStream(new File(japdir)); try { JRXmlDataSource xmlDataSource = new JRXmlDataSource( new FileInputStream(new File(xmldir))); JasperRunManager.runReportToPdfStream(reportStream, os, parameters, xmlDataSource); os.flush(); os.close(); } catch (Exception e) { e.printStackTrace(); } } catch (FileNotFoundException e) { e.printStackTrace(); } } Any help is appreciated.Thanks in advance GuoXC
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now