adavidson Posted December 20, 2010 Share Posted December 20, 2010 Hi,I have a report which in iReport works perfectly but when I try to put this into a JSP I cannot get anything to render at all. The main code in my JSP is: String reportFileName = application.getRealPath("/jsp/s.jasper"); File reportFile = new File(reportFileName); if (!reportFile.exists()) throw new JRRuntimeException("File "+reportFileName+" not found. The report design must be compiled first."); JasperPrint jasperPrint = JasperFillManager.fillReport(reportFileName, null, conn); JasperExportManager.exportReportToHtmlFile(jasperPrint, "c:\\s.html");However the s.html it produces is virtually empty - it does get created when I run the above JSP but it produces a simple empty two column table (as attached) which of course is not what my report should look like!Is the above code wrong? Any clues on how to make this work would be much appreciated as I've hunted around for days trying to find why this is happening.Many thanks in advance,Andrew. Link to comment Share on other sites More sharing options...
adavidson Posted December 20, 2010 Author Share Posted December 20, 2010 Post Edited by adavidson at 12/21/2010 06:22 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