【问题标题】:Compiling .jrxml design to get .jasper files with Makefile使用 Makefile 编译 .jrxml 设计以获取 .jasper 文件
【发布时间】:2013-12-23 08:58:32
【问题描述】:

我有不同的 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 设计?

【问题讨论】:

  • 你想用java编译jrxml到jasper吗
  • @NidhishKrishnan 是的 :)
  • 检查我的答案........
  • 是的,我正在努力

标签: java makefile jasper-reports


【解决方案1】:

您可以使用 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 

【讨论】:

    猜你喜欢
    • 2011-05-26
    • 1970-01-01
    • 1970-01-01
    • 2014-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多