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

internationalization >> help me please..


samerzohdi

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

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

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 

Link to comment
Share on other sites

  • 2 months later...

giulio
Wrote:

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 it

I 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 lot

Bye

Matteo

Code:
      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

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