samerzohdi Posted May 4, 2009 Share Posted May 4, 2009 where I can do internationalization in iReport 3.5???I am not found it as 3.0 or 2.1 ...can you please help me. Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 5, 2009 Share Posted May 5, 2009 - create a resource bundle- set the resource bundle base name in the report properties To create more languages, just open the favorites window, open the bundle file directory, then from there you can add languages:/uploads/projects/ireport/locale.pngGiulio Link to comment Share on other sites More sharing options...
samerzohdi Posted May 5, 2009 Author Share Posted May 5, 2009 thank you so much, But I don't know How I can get the Bundle window?? .. I am new on Jasper, so please help me. Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 5, 2009 Share Posted May 5, 2009 There is no Bundle window, it is the favorites (Windows->Favorites), then add to the favorites the directory in which there are your bundle files.Giulio Link to comment Share on other sites More sharing options...
samerzohdi Posted May 5, 2009 Author Share Posted May 5, 2009 thanks, I got it and I put key and values under the default language. But I got the ERROR: ErrorÂfillingÂprint...ÂCan'tÂfindÂbundleÂforÂbaseÂnameÂApplicationResources,ÂlocaleÂen_US java.util.MissingResourceException:ÂCan'tÂfindÂbundleÂforÂbaseÂnameÂApplicationResources,ÂlocaleÂen_USÂ ÂÂÂÂatÂjava.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)Â ÂÂÂÂatÂjava.util.ResourceBundle.getBundleImpl(ResourceBundle.java:726)Â ÂÂÂÂatÂjava.util.ResourceBundle.getBundle(ResourceBundle.java:699)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.util.JRResourcesUtil.loadResourceBundle(JRResourcesUtil.java:572)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.util.JRResourcesUtil.loadResourceBundle(JRResourcesUtil.java:510)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.loadResourceBundle(JRFillDataset.java:533)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:568)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1222)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:853)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421)Â ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:251)Â ÂÂÂÂatÂcom.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:896)Â ÂÂÂÂatÂorg.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)Â ÂÂÂÂatÂorg.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)Â Print not filled. Try to use an EmptyDataSource... what I should do? Link to comment Share on other sites More sharing options...
samerzohdi Posted May 5, 2009 Author Share Posted May 5, 2009 please see attached Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 5, 2009 Share Posted May 5, 2009 What's the basename you have set in the report properties?It looks like it is: ApplicationResourcesIn that case you should have in the same directory of your report (or in a directory in the iReport classpath (Tools->Options->iReport->Classpath) a file called ApplicationResources.properties (end optionally ApplicationResources_en_US.properties)Giulio Link to comment Share on other sites More sharing options...
mrespog Posted July 13, 2009 Share Posted July 13, 2009 giulioWrote: What's the basename you have set in the report properties? It looks like it is: ApplicationResources In that case you should have in the same directory of your report (or in a directory in the iReport classpath (Tools->Options->iReport->Classpath) a file called ApplicationResources.properties (end optionally ApplicationResources_en_US.properties) Giulio Hello Giulio,I'm Matteo from Italy, I don;t know if write in italian or in english...I think englsh is better for other forum's people but i'm sorry for my not so good english!!I had the same problem, but with a little difference...I have a localized report whic use a resource bundel file called reportMsg.properties in the same directory of the jrxml and the jasper file.When I preview the report in iReport all works fine.When i try to call the report in my application (a zk webapp deployed on WAS 6.01 and using ejb 2.0) i had the same error as samerzohdi, java.util.MissingResourceException: Can't find bundle for base name reportMsg, locale itI attack the java code I use to generate the pdf.The line Filedownload.save(buffer, APPLICATION_PDF, EXPORT_PDF);is to tell to zk framework to download directly the generated pdf.I can't understand where I'm wrong: how can my report be generated correctly by iReport and not by my java code? The files used are the same in both the situation...maybe i forgot somethign in my java snip.Can you help me please?Thanks a lotBye MatteoCode: InputStream reportStream = null; try { reportStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(src); Map<String, Object> params = new HashMap<String, Object>(); params.put("distinta", distinta); JRBeanCollectionDataSource collection = new JRBeanCollectionDataSource(distinta.getListaDisposiz()); byte[] buffer = JasperRunManager.runReportToPdf(reportStream, params, collection); Filedownload.save(buffer, APPLICATION_PDF, EXPORT_PDF); } catch (Exception ex) { ex.printStackTrace(); throw new Exception(ex); } finally { if (reportStream != null) { try { reportStream.close(); } catch (IOException e) { } } } Link to comment Share on other sites More sharing options...
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