I\'m working on a project that needs Jasper reporting, I have used the code fragment mentioned below to view the report in NetBeans 6.1 (the report is originally generated a
Try:
JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
See JasperExportManager.exportReportToHtmlFile(). I assume that's the method you mean.
This is because, while creating a report you have selected language as Grrovy but this using jrxml in java program.In jrxml file,
It means that the groovy library dependency is missing.
We can add the groovy-1.7.5.jar
(it depends on JasperReports
version) in classpath to resolve this issue.
We can find the groovy
's dependency in the the JasperReports
library pom.xml
file. For the JR 4.5.0 version it is:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.5</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
In case of using maven
we can add this dependency to the project:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.5</version>
</dependency>