ktrinad Posted August 20, 2006 Share Posted August 20, 2006 By: Jorn T. Nordahl - jorntnordahl Splitting HTML Report into multiple files... 2004-11-15 10:35I would like to be able to produce an html report that consists of multiple files, one per page, instead of the current 1 huge html file. Is this possible? By: lkaap - girishkm67 RE: Splitting HTML Report into multiple files... 2004-11-18 03:47Just use this piece of code.... most of it is pretty clear. U will be generating a html file for each page. Hope u find it useful JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); for(int i=0;i<pageList.size();i++) { String fileName = ((int)(Math.random()*100000))+".html"; fileNames.add(fileName); } for(int i=0;i<fileNames.size();i++) { exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, fileNames.get(i)); exporter.setParameter(JRExporterParameter.PAGE_INDEX,new Integer(i)); exporter.setParameter exporter.exportReport(); } 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