本文介绍了Maven jasperreports-functions.6.1.1的存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很明显

 <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>6.1.1</version>
 </dependency>

取决于jasperreports-functions,但是我无法在任何存储库中找到它.我在Tibco Jasper Studio中看到了jar文件,发现 http://community.jaspersoft.com /project/jasperreports-library/releases 链接下载该库,但是我们在公司环境中使用maven,因此,我非常感谢maven存储库自动下载工件.

depends on jasperreports-functions, but I cannot find this in any repository. I see the jar file in Tibco Jasper Studio, I found http://community.jaspersoft.com/project/jasperreports-library/releases link to download the library, however we use maven in corporate environment, so I would appreciate maven repository to download the artifact automatically.

更新

我的问题是我可以在Tibco Jasper Studio中编译和运行模板,但是我不能使用Java api编译模板

My problem is that I can compile and run templates in Tibco Jasper studio, but I cannot compile the templates using java api

JasperCompileManager.compileReportToFile(src, dest);

我在打印时使用函数,例如:

I'm using functions in print when expression like:

NOT(EQUALS($F{title}, null))

并在使用Java进行编译时出现错误:

and getting errors when compiling in java like:

Caused by: net.sf.jasperreports.engine.JRException: Errors were   encountered when compiling report expressions class file:
1. The method EQUALS(String, null) is undefined for the type sickInjuriesClosePerson_1447428912021_94804
            value =   NOT(EQUALS(((java.lang.String)field_title.getValue()), null)); //$JR_EXPR_ID=9$
                        <---->
2. The method EQUALS(String, null) is undefined for the type sickInjuriesClosePerson_1447428912021_94804
            value = NOT(EQUALS(((java.lang.String)field_firstName.getValue()), null)); //$JR_EXPR_ID=11$
                        <---->

在这一点上,我确定是因为我的类路径中缺少jasperreports-functions-6.1.1.jar.该文件存在于jaspersoft @ studio

At this point I'm sure it's because I'm missing jasperreports-functions-6.1.1.jar on my classpath. This file is present in jaspersoft@studio

推荐答案

  1. 添加存储库

  1. Add the repository

<repository>
    <id>jr-ce-releases</id>
    <url>http://jaspersoft.artifactoryonline.com/jaspersoft/jr-ce-releases</url>
</repository>

  • 为项目添加依赖项

  • Add dependency to your project

        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports-functions</artifactId>
            <version>6.6.0</version>
        </dependency>
    

  • 这篇关于Maven jasperreports-functions.6.1.1的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    09-16 11:27