2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: karthika - karthika pdf,html 2004-05-15 23:56 can i use both at a same time. i mean i have two radio button pdf,html,excel etc. is it possible? post sample code please By: Mark Engstrom - me2kme RE: pdf,html 2004-05-18 05:22 Assuming you have an already filled JasperPrint object jdPrintOut. From one buttons handler just call : JasperExportManager.exportReportToPdfFile(jdPrintOut, strFilename); From the other call : JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jdPrintOut); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, strFilename); if ( !allOnOnePage ) { exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); } else { exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); } exporter.exportReport(); Hope it helps. 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