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

时间:2013-12-23 08:58:33

标签: java makefile jasper-reports

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

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

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

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

1 个答案:

答案 0 :(得分:2)

您可以使用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 
相关问题