Jump to content

Report with charts not rendering from JSP


adavidson

Recommended Posts

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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...