Skip to content

Instantly share code, notes, and snippets.

@xnrghzjh
Created November 22, 2011 00:23
Show Gist options
  • Save xnrghzjh/1384468 to your computer and use it in GitHub Desktop.
Save xnrghzjh/1384468 to your computer and use it in GitHub Desktop.
JasperReportsの高速化対応
String sourcePath = "./Report/sample.jrxml";
String binaryPath = "./Report/bin/sample.jasper" ;
File source = new File(sourcePath);
File binary = new File(binaryPath);
if (!binary.exists() || source.lastModified() > binary.lastModified()) {
JasperCompileManager.compileReportToFile(source.getAbsolutePath(),
binary.getAbsolutePath());
}
jasperPrint = JasperFillManager.fillReport(binary.getAbsolutePath(),
paramMap,
reportDataSource);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment