3

I have been working with jasper reports for quite some time
All these days, I have compiled .jrxml files using IReport tool and copied the .jasper file in
my web application. I know of the JaperCompileManager which does compiling of .jrxml and produce .jasper files at the run time. Have few queries about it

  1. Will it compile and produce .jasper file each time I open the report or compile and preserve the .jasper file till any change happens in .jrxml file?
  2. Is there any performance impact in doing this run time compilation
  3. Which approach is better? Using pre compiled jasper files or use .jrxmls for run time compilation?
4

1 回答 1

6

Jasper files, are jrxml files compiled into Java bytecode, JasperReports requires the use of Jasper files so you need to compile your jrxml files for it to work, the compilation step is pretty costly, but it can be done once if you have the file cached somewhere and use something like what's defined here: How to compile .jrxml only once; however, if your reports are inmutable, then you're better compiling your reports before deploying them, both for performance and security purposes.

By the way, the official way of deploying Jasper reports is just deploy the jasper file.

于 2013-08-09T14:46:36.390 回答