NetBeans:JasperReport Exception

前端 未结 3 350
走了就别回头了
走了就别回头了 2021-01-14 01:51

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

相关标签:
3条回答
  • 2021-01-14 02:28

    Try:

    JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
    

    See JasperExportManager.exportReportToHtmlFile(). I assume that's the method you mean.

    0 讨论(0)
  • 2021-01-14 02:45

    This is because, while creating a report you have selected language as Grrovy but this using jrxml in java program.In jrxml file,

    0 讨论(0)
  • 2021-01-14 02:47

    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>
    
    0 讨论(0)
提交回复
热议问题