When do I need to re-compile Jasper reports

不打扰是莪最后的温柔 提交于 2020-01-30 06:36:30

问题


I'm using JasperReporting engine, and i need to optimize reporting performance. 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?? And do I need to re-compile them? Thanks in advance!


回答1:


Let your application check both the .jrxml file and the .jasper file; if the later is missing or older than the .jrxml, recompile, otherwise just use the .jasper file.




回答2:


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
  • reports are generated on the fly, dynamically - in that case you'll need to compile them everytime. This is a much rarer case, though.


来源:https://stackoverflow.com/questions/3778947/when-do-i-need-to-re-compile-jasper-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!