Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automate your love letter creation with JasperReports

Automate your love letter creation with JasperReports

JasperReports is the world's most popular open source reporting engine. It is entirely written in Java and it is able to use data coming from any kind of data source and produce pixel-perfect documents that can be viewed, printed or exported in a variety of document formats including HTML, PDF, Excel, OpenOffice and Word.

In this session you see what Jasper is able to do for you and how you can use it with CFML. And if that isn't enough, we'll build an app that will automate your love letter creation!

Code: https://github.com/Lagaffe/Loverrr

7587064f2cbfab406eaabbcbfc9a1d25?s=128

Guust Nieuwenhuis

October 21, 2014
Tweet

More Decks by Guust Nieuwenhuis

Other Decks in Technology

Transcript

  1. Jasper Reports Automate  your  love  le-er  crea/on Guust  Nieuwenhuis,  Prisma

     IT CFCamp  2014   Munich,  Germany
  2. Guust Nieuwenhuis Managing  Director  Belgium SPECIALITIES COMPANY FREE TIME Prisma

     IT Applica/on  Architecture,  Content  Architecture,  Analysis,   Development Mura  CMS,  ColdFusion,  Railo Family,  Playing  the  Drums  &  (Double)  Bass,  Mountain  biking,   Games,  …
  3. <cfreport> is based on an "ancient" version of Jasper Reports

  4. CFJasperReport JaspersoA  Studio JasperReports  Library Overview These  are  the  tools

     we’ll  be  looking  at  today:
  5. Architecture

  6. JasperReports Library The  Engine https://flic.kr/p/8hDCW3

  7. About ▸  Repor/ng  engine ▸  Java  Library ▸  Open  Source

     (LGPL) ▸  TIBCO  JasperSoQ http://community.jaspersoft.com/project/jasperreports-library
  8. Features ▸  Layout  and  Interac/ve  Features ▸  Flexible  Deployment  and

     Output – PDF,  XML,  HTML,  CSV,  XLS,  RTF,  TXT ▸  Any  Data  Source  Connec/vity ▸  Scalable  Architecture
  9. Jaspersoft Studio The  Designer https://flic.kr/p/bGhWhv

  10. About ▸  Rewrite  of  iReport  Designer ▸  Standalone  or  Eclipse-­‐plugin

    ▸  .JRXML  and  .jasper ▸  Engine  build  in  for  previews http://community.jaspersoft.com/project/jaspersoft-studio
  11. Interface

  12. Structure ▸  9  bands – Fixed  width,  variable  height ▸  Columns

  13. Objects ▸  $F{name_field}   ▸  $V{name_variable}   ▸  $P{name_parameter}  

    ▸  $R{resource_key}  
  14. Expressions ▸  Using  Java ▸  Using  Groovy ▸  Using  JavaScript

  15. Let’s  take  a  closer  look!

  16. CFJasperReport The  Interface https://flic.kr/p/9UNeUM

  17. About ▸  Custom  Tag ▸  JasperReports  wrapper ▸  Open  Source

     (MIT) ▸  By  Denny  Valliant https://github.com/denuno/cfjasperreport
  18. Installation ▸  Railo  Extension – Extension  provider:   h-p://cfmlprojects.org/extension/index.cfm ▸  Manual

    – Download   h-p://cfmlprojects.org/ar/facts/cfml/ccasperreport/ccasperreport/ – Unzip – <cfimport>
  19. Example <cf_jasperreport jrxml=”{path_to_jrxml}”
 resourcebundle=”{path_to_resourcebundle}”
 reportparams=”{params}”
 dsn=”{dsn}”
 datafile=”{datafile}”
 exportfile=”{path_to_output}”
 exporttype=”pdf”
 />

  20. Fire  up  your  IDE,  it’s  /me  for  code!

  21. Thank you for  listening Guust  Nieuwenhuis g.nieuwenhuis@prisma-­‐it.com h-p://www.lagaffe.be