alexfe Posted February 23, 2010 Share Posted February 23, 2010 Hi, i have the next problem:I made my report with iReport, this one is simple and print 100 rows maybe more, i want that my column header repeat in each page at the beginning, executing the report with iReport works, but when i do the same in my application the column header is not appers to the beginning, my code is:JasperPrint jasperPrint = JasperFillManager.fillReport(new FileInputStream(reportFile), parameters, conn); JRXlsExporter xlsExporter = new JRXlsExporter(); xlsExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); xlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName); xlsExporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE); xlsExporter.exportReport();i' tried using page header instead, but it's not work.Please anyone who can help me.thanks.AlexCode:JasperPrint jasperPrint = JasperFillManager.fillReport(new FileInputStream(reportFile), parameters, conn); JRXlsExporter xlsExporter = new JRXlsExporter(); xlsExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); xlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName); xlsExporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE); xlsExporter.exportReport(); Link to comment Share on other sites More sharing options...
voll Posted February 24, 2010 Share Posted February 24, 2010 hello: i think that the following attributes can help you. exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); Link to comment Share on other sites More sharing options...
alexfe Posted February 24, 2010 Author Share Posted February 24, 2010 hi, tanks u for the answer, i tried but it does not work, i have the same problem, i try too with PDF JasperPrint jasperPrint = JasperFillManager.fillReport(new FileInputStream(reportFile), parameters, conn); JRPdfExporter exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName); exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint); exporter.exportReport();In PDF format it's work, i don't know why the problem in excel, is the same jasper report, Tanks again Link to comment Share on other sites More sharing options...
benyahia4 Posted February 25, 2010 Share Posted February 25, 2010 Try use JExcelApiExporter instead of JRXlsExporter Link to comment Share on other sites More sharing options...
alexfe Posted February 25, 2010 Author Share Posted February 25, 2010 Hi, i tried with that library and it does not work.The error is because in the first row each page, the height is not the same, in the first page, the row has a height 20, in the second page that height is de 40, same the next pages, how can i set height the first row of each page???. Thans a lot. 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