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

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

    View Slide

  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,  …

    View Slide

  3. is based on
    an "ancient" version of
    Jasper Reports

    View Slide

  4. CFJasperReport
    JaspersoA  Studio
    JasperReports  Library
    Overview
    These  are  the  tools  we’ll  be  looking  at  today:

    View Slide

  5. Architecture

    View Slide

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

    View Slide

  7. About
    ▸  Repor/ng  engine
    ▸  Java  Library
    ▸  Open  Source  (LGPL)
    ▸  TIBCO  JasperSoQ
    http://community.jaspersoft.com/project/jasperreports-library

    View Slide

  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

    View Slide

  9. Jaspersoft Studio
    The  Designer
    https://flic.kr/p/bGhWhv

    View Slide

  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

    View Slide

  11. Interface

    View Slide

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

    View Slide

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

    View Slide

  14. Expressions
    ▸  Using  Java
    ▸  Using  Groovy
    ▸  Using  JavaScript

    View Slide

  15. Let’s  take  a  closer  look!

    View Slide

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

    View Slide

  17. About
    ▸  Custom  Tag
    ▸  JasperReports  wrapper
    ▸  Open  Source  (MIT)
    ▸  By  Denny  Valliant
    https://github.com/denuno/cfjasperreport

    View Slide

  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
    – 

    View Slide

  19. Example
    jrxml=”{path_to_jrxml}”

    resourcebundle=”{path_to_resourcebundle}”

    reportparams=”{params}”

    dsn=”{dsn}”

    datafile=”{datafile}”

    exportfile=”{path_to_output}”

    exporttype=”pdf”

    />

    View Slide

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

    View Slide

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

    View Slide