silvana.maissen Posted May 6, 2013 Share Posted May 6, 2013 Hello, I'm a newbeI tried to generate a Report with Eclipse / JasperSoft Studio here's my code:public void reportGenerieren(List daten, String path) throws JRException{ JasperReport jr = (JasperReport) JRLoader.loadObjectFromFile(path); JasperPrint jasperPrint = JasperFillManager.fillReport(jr, null, new JRBeanCollectionDataSource(daten)); //JasperPrintManager.printReportToPdfFile(jasperPrint, "C:\meinePDF.pdf"); JRPdfExporter pdf = new JRPdfExporter(); pdf.setParameter(JRPdfExporterParameter.JASPER_PRINT, jasperPrint); pdf.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "C:\Temp\test.pdf"); pdf.exportReport(); }But I allways get the error: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : gueltigbisHow can I solve this problem?Thanks for your help Link to comment Share on other sites More sharing options...
sanbez Posted May 7, 2013 Share Posted May 7, 2013 Show your bean (daten) and jrxml. You should check getter for "gueltigbis" Link to comment Share on other sites More sharing options...
silvana.maissen Posted May 9, 2013 Author Share Posted May 9, 2013 Hello againYou find attached my jrxml-File, class 'Vertrag' and class 'Geraet', which contains 'gueltigbis'. Thank you very much! Link to comment Share on other sites More sharing options...
sanbez Posted May 15, 2013 Share Posted May 15, 2013 I am guess that daten is a list of geraet. Two ways for solution: 1. Change getter for gueltigbis from "getGueltigBis()" (now) to "getGueltigbis()" - it must match field name in jrxml (case-sensitive) or2 Change field "gueltigbis" to "gueltigBis" in jrxml 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