Created
November 22, 2011 00:23
-
-
Save xnrghzjh/1384468 to your computer and use it in GitHub Desktop.
JasperReportsの高速化対応
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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