maven jasperreports-functions-6.1.1的存储库

Pav*_*oba 7 jasper-reports maven

明显

 <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>6.1.1</version>
 </dependency>
Run Code Online (Sandbox Code Playgroud)

取决于jasperreports-functions,但我无法在任何存储库中找到它.我在Tibco Jasper Studio中看到jar文件,我发现http://community.jaspersoft.com/project/jasperreports-library/releases链接下载库,但是我们在企业环境中使用maven,所以我很感激maven存储库到自动下载工件.

更新

我的问题是我可以在Tibco Jasper studio中编译和运行模板,但我无法使用java api编译模板

JasperCompileManager.compileReportToFile(src, dest);
Run Code Online (Sandbox Code Playgroud)

表达式如下所示,我在打印时使用函数:

NOT(EQUALS($F{title}, null))
Run Code Online (Sandbox Code Playgroud)

在java中编译时遇到错误:

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$
                        <---->
Run Code Online (Sandbox Code Playgroud)

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

Jos*_*ino 5

  1. 添加存储库

    <repository>
        <id>jr-ce-releases</id>
        <url>https://jaspersoft.jfrog.io/artifactory/jr-ce-releases</url>
    </repository>
    
    Run Code Online (Sandbox Code Playgroud)
  2. 将依赖项添加到您的项目中

        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports-functions</artifactId>
            <version>6.6.0</version>
        </dependency>
    
    Run Code Online (Sandbox Code Playgroud)


小智 0

依赖项 net.sf.jasperreports 应该包含所有 JsasperReporsts 6.1.1 功能,或者简单地从以下位置下载 jar: http: //mvnrepository.com/artifact/net.sf.jasperreports/jasperreports/6.1.1

  • 我刚刚检查了 Jar 文件的内容。它确实包含带有一些工厂和实用程序类的包文件。但它缺少“标准”子包,其中包含“LogicalFunctions”、“MathFunctions”和“TextFunctions”等函数。所以你不在这里 (2认同)