简体   繁体   English

我什么时候需要重新编译Jasper报告

[英]When do I need to re-compile Jasper reports

I'm using JasperReporting engine, and i need to optimize reporting performance. 我正在使用JasperReporting引擎,并且需要优化报告性能。 Currently my application compiles reports from *.jrxml files every time, as I'm not changing the reports now and app is not able to generate user-defined reports I should compile them once and use .jasper files in future..... AM I RIGHT?? 目前,我的应用程序每次都从* .jrxml文件编译报告,因为我现在不更改报告,并且应用程序无法生成用户定义的报告,我应该编译一次并在将来使用.jasper文件.....我对吗?? And do I need to re-compile them? 我需要重新编译它们吗? Thanks in advance! 提前致谢!

Let your application check both the .jrxml file and the .jasper file; 让您的应用程序同时检查.jrxml文件和.jasper文件; if the later is missing or older than the .jrxml, recompile, otherwise just use the .jasper file. 如果缺少或晚于.jrxml,请重新编译,否则只需使用.jasper文件。

You must not recompile your reports if you don't change them. 如果不更改报告,则不能重新编译报告。 Actually, there are two regular scenarios: 实际上,有两种常规方案:

  • reports created by iReport - in that case compile them in iReport and use the compiled form 由iReport创建的报告-在这种情况下,请在iReport中将其编译并使用已编译的表单
  • reports are generated on the fly, dynamically - in that case you'll need to compile them everytime. 报告是动态动态生成的-在这种情况下,您需要每次都进行编译。 This is a much rarer case, though. 但是,这是一种罕见得多的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM