Integrating JasperReports with WebObjects

1,903 views
1,767 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,903
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
60
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integrating JasperReports with WebObjects

  1. 1. Integrating JasperReports with WebObjects Kieran Kelleher WOWODC 2010 Montreal Green Island Consulting LLC SmartleadsUSA LLC SmartMix Technologies LLCFriday, September 3, 2010
  2. 2. Objectives • Overview of JasperReports • High Level Overview of Report Generation • JasperReports Architecture & Dependencies • WebObjects Integration • Developing a Report • Running a ReportFriday, September 3, 2010
  3. 3. What is ? • http://jasperforge.org/projects/jasperreports • “worlds most popular open source reporting engine.” • “entirely written in Java” • “use data coming from any kind of data source” • “produce pixel-perfect documents that can be viewed, printed or exported in a variety of document formats including HTML, PDF, Excel, OpenOffice and Word.”Friday, September 3, 2010
  4. 4. Feature Highlights • Pixel-perfect page-oriented or continuous output for web or print • Traditional tabulated data, multi-level grouping and data aggregating by group • Dashboards, tables, crosstabs, charts and gauges • Report output in PDF, XML, HTML, CSV, XLS, RTF, TXT • Integrated barcode support • No limit to report size • Conditional printing • Sub-reports handle highly complex layouts • Multiple data sources of multiple kinds in one report • Internationalized and Localizable • etc., etc.Friday, September 3, 2010
  5. 5. Flexible Data Sources • JRDataSource interface • Database JDBC connection • File CSV data source • XML file data source • etc., etc., etc. • Custom JRDataSource • KeyValueCoding objectsFriday, September 3, 2010
  6. 6. Overview of Report Generation Development Runtime JRDataSource JasperReports Engine Report Report Properties HashMapFriday, September 3, 2010
  7. 7. JasperReports Architecture Dependencies JasperReports iText JFreeChart Apache POI Apache Commons ... and more... Jaxen-1.1.1 jpa.jar jxl-2.6.jar png-encoder-1.5 barcode4j-2.0Friday, September 3, 2010
  8. 8. ERJasperReports ERJasperReports JasperReports 3.7.4 Apache Commons iText 2.1.7 JFreeChart 1.0.12 Apache POI 3.5 ... and more... (various) Jaxen-1.1.1 jpa.jar jxl-2.6.jar png-encoder-1.5 barcode4j-2.0Friday, September 3, 2010
  9. 9. What is in ERJasperReports • jar libs for JasperReports and its essential dependencies • Custom JRDataSource for array or enumeration of KVC objects. • java.util.concurrent.Callable task operating on a EOFetchSpec • Convenience utility method for calling JR. • Add the framework to your project. Has Wonder dependency • Not yet committed to Wonder :-( • Should be within a week :-)Friday, September 3, 2010
  10. 10. Planned Improvements • Batching and EOEditingContext recycling for huge data-sets. • API for subreports • Planned before end of the yearFriday, September 3, 2010
  11. 11. “Quick” Test-Drive • DEMOFriday, September 3, 2010
  12. 12. ERJasperReports Usage - Typical Logic Pre-Requisites Create the EOFetchSpecification Create 1. report.jasper file in LongResponse Page Resources Optionally create the 2. ERJasperReports in Parameters HashMap the classpath Run Background Task Create ERJasperReportTask Download the ReportFriday, September 3, 2010
  13. 13. Report Design Tool • iReport.app • http://sourceforge.net/projects/ireport/files/ • iReport.dmg installer for OS X • IMPORTANT: iReport version must match JasperReports • JasperReports dist bundled inside iReport.app • Current version is 3.7.4Friday, September 3, 2010
  14. 14. iReport.app Report Designer Report Inspector Elements Palette Property Sheet Styles Problems ConsoleFriday, September 3, 2010
  15. 15. Demo • Designing a Report with iReport.app • Example WebObjects app using JasperReportsFriday, September 3, 2010
  16. 16. Beta Project Repository • http://montreal2010.googlecode.com/svn/trunk/ • ERJasperReports • Wonder dependency • ERExtensionsIncubator (temporary) • ERJasperReportsExample • ERJasperReports and its dependencies • WKDemoReusable (temporary - to be merged into example)Friday, September 3, 2010
  17. 17. Example Setup • Wonder needs to be installed • svn checkout from http://montreal2010.googlecode.com/svn/trunk/ • ERJasperReports • ERExtensionsIncubator • ERJasperReportsExample • WKDemoReusable • ERMoviesLogic database setup • ERJasperReportsExample/Documentation/README.txtFriday, September 3, 2010
  18. 18. Documentation • Best available (IMHO), to get you started... • “jasper Reports 3.5 for Java Developers” - amazon.com • Also.... • JasperForge.org (you probably need a free account) • intros, tutorials, forum, etc. • Down load source. See readme.txt, demo, dist/javadoc,Friday, September 3, 2010
  19. 19. Resources • http://sourceforge.net/projects/jasperreports/files/jasperreports • http://sourceforge.net/projects/ireport/files/ • http://jasperforge.org/ • *Temporary Repository for Beta Project* • http://code.google.com/p/montreal2010/source/checkoutFriday, September 3, 2010
  20. 20. Q&A Integrating JasperReports with WebObjects WOWODC 2010Friday, September 3, 2010

×