2002 JI Open Discussion Posted August 17, 2006 Share Posted August 17, 2006 By: edgeman - edgeman detail is blank when using API 2003-03-25 01:50 I use IReport to make simple report with static text detail, and compile to xls successfully in IReport. But using API, the part of detail is blank! (the header and footer display normally) The source code like below: System.setProperty ("org.xml.sax.driver","org.apache.xerces.parsers.SAXParser"); try { JasperReport jasperReport = JasperCompileManager.compileReport ("Jasper.xml"); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,null,(JRDataSource) null); JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "Jasper.xls"); exporter.exportReport(); } catch( Exception e ) { System.out.println( "make report error" ); System.out.println(e); } By: edgeman - edgeman RE: detail is blank when using API 2003-03-25 02:56 thank everyone! I got the answer in these messages: By: carvermotion ( Enrico Colombo ) Method JasperManager.fillReportToFile 2002-03-07 15:41 I need to pass to method 'JasperManager.fillReportToFile' only report design file and parameters, no connections or resultsets ('null' parameters does not work). Can anybody help me? Thanks carvermotion By: teodord ( Teodor Danciu ) RE: Method JasperManager.fillReportToFile 2002-03-07 17:02 Hi, Provide the fill method with the most basic data source available, which is the JREmptyDataSource. You can find this in the samples. JasperManager.fillReportToFile( fileName, parameters, new JREmptyDataSource() ); Good luck! Teodor By: carvermotion ( Enrico Colombo ) RE: Method JasperManager.fillReportToFile 2002-03-08 11:38 Thank you very much! It is what I was looking for!! Bye carvermotion 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