gpt4 book ai didi

java - 使用 Makefile 编译 .jrxml 设计以获取 .jasper 文件

转载 作者:行者123 更新时间:2023-11-30 04:05:53 32 4
gpt4 key购买 nike

我有不同的 jrxml 文件,我想编译它以获得 .jasper 设计。我为此编写了一个 ant build.xml 文件,它工作正常。这是使用的类:

 <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask"> 
<classpath refid="classpath"/>
</taskdef>

现在我想用 GNU Makefile 编译它,但我找不到为此执行的类。

如何使用 Makefile 编译并获取 jasper 文件:哪个类必须在 jasper jar 中执行才能获取 jasper 设计?

最佳答案

您可以使用 JasperCompileManager 类从 Java 代码进行编译。

JasperCompileManager.compileReportToFile(
our_jasper_template.jrxml",//the path to the jrxml file to compile
our_compiled_template.jasper");//the path and name we want to save the compiled file

关于java - 使用 Makefile 编译 .jrxml 设计以获取 .jasper 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20740084/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com