Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <dependency>
- <groupId>net.sf.jasperreports</groupId>
- <artifactId>jasperreports</artifactId>
- <version>4.1.2</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <version>1.7.5</version>
- </dependency>
- public class JasperReportsIntro
- {
- public static void main(String[] args)
- {
- JasperReport jasperReport;
- JasperPrint jasperPrint;
- try
- {
- jasperReport = JasperCompileManager.compileReport("reports/jasperreports_demo.jrxml");
- jasperPrint = JasperFillManager.fillReport(
- jasperReport, new HashMap(), new JREmptyDataSource());
- JasperExportManager.exportReportToPdfFile(
- jasperPrint, "reports/simple_report.pdf");
- }
- catch (JRException e)
- {
- e.printStackTrace();
- }
- }
- }
Add Comment
Please, Sign In to add comment