SlideShare a Scribd company logo
1 of 19
Download to read offline
1




Albert Guo
2




Agenda
 Introduction
 Prerequisites
 Typical Workflow
 Document Sections (Bands) Overview
 JasperReports Architecture
3




Introduction
 Open source Java reporting library
 Under the Lesser GNU Public License (LGPL)
 Since 2001
 Backed by a company now, JasperSoft
 2007 Duke’s Choice Award Winner
4




Introduction – cont.
 Support multiple data sources
     Database connection
     Embedded SQL statement
     Java Collections (Collection, Array and Map)
     JDBC result set
 Support multiple report formats
   PDF, XLS, CSV, HTML, XML, RTF, ODT, TXT
5




Prerequisites
 Download Sun Java 2 SDK 1.5 or newer
 iReport eats a lot of RAM, and so it is necessary to have at
  least 256MB of memory and about 20MB of free space on
  disk
 Download iReport from http://sourceforge.net/projects/ireport
 Download JasperReports from
  http://sourceforge.net/projects/jasperreports/files/jasperreport
  s/
6




Fail to open jrxml by iReport
 Problem
   As I use iReport 4.0.2 to open jrxml file, but it show this error
    message:
    javax.xml.parsers.FactoryConfigurationError: Provider
     org.apache.xerces.jaxp.SAXParserFactoryImpl not found
     at
     javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.j
     ava:134)
     at org.netbeans.lib.uihandler.LogRecords.scan(LogRecords.java:127)
     at org.netbeans.modules.uihandler.Installer.getLogs(Installer.java:681)
     at org.netbeans.modules.uihandler.Installer$Submit.(Installer.java:1317)
 Solution
   Change your JAVA_HOME to standard JDK instead of IBM JDK.
7




Typical Workflow
8




Document Sections (Bands)
Overview
9




         Document Sections (Bands)
         Overview
Document        Description
Sections
title           printed only once at the beginning of the report
pageHeader      printed at the beginning of every page in the report.
Column Header   printed at the beginning of each detail column
Detail          corresponds to every record that is read by the datasource that feeds the
                report
Column Footer   The column footer band appears at the end of every column.
Page Footer     The page footer band appears on every page where there is a page
                header
Summary         The summary band allows you to insert fields concerning total calculations,
                means, or whatever
                you want to insert at the end of the report
10




Check “Blank When Null”
11




Avoid broken character
12




JasperReports Architecture
13




JasperReports Architecture
14




                                       http://0rz.com/RMSbdY


Maven 2 JasperReports Plugin
 This plugin provides the capability to compile Jasper Report
  xml design files.
15




JasperReports Architecture
16




5 Steps to export report
Step              Description
Get data source   Input List of value object, and create
                  JRBeanCollectionDataSource
Read Jasper       Read .jasper file
File
Generate          Read report input stream and create JasperPrint
JasperPrint       object
Set response     Assign content type and header based on the
content type and export type
header
Export Report     Assign export API to do export based on the export
                  type
17




                    http://0rz.com/3MrvkI

5 Steps to export report – cont.
18




MS Excel wasn't displaying a CSV
file with UTF-8 encoding correctly.
19




MS Excel wasn't displaying a CSV
file with UTF-8 encoding correctly.
 In the absence of any charset identification, Excel must
  guess about a file's content encoding. Therefore, Excel uses
  that default to read and display CSV files.

      //byte-order marker (BOM)
      byte b[] = {(byte)0xEF, (byte)0xBB, (byte)0xBF};
      //insert BOM byte array into outputStream
      outputStream.write(b);


      http://http://0rz.com/QFcaEW

More Related Content

What's hot

React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMJimit Shah
 
Spring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOPSpring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOPJustin Lin
 
Saturn 2018 rest.li
Saturn 2018 rest.liSaturn 2018 rest.li
Saturn 2018 rest.liMin Chen
 
React js programming concept
React js programming conceptReact js programming concept
React js programming conceptTariqul islam
 
AEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentAEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentGabriel Walt
 
Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101TIBCO Jaspersoft
 
jpa-hibernate-presentation
jpa-hibernate-presentationjpa-hibernate-presentation
jpa-hibernate-presentationJohn Slick
 
Spring bootでweb 基本編
Spring bootでweb 基本編Spring bootでweb 基本編
Spring bootでweb 基本編なべ
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesVMware Tanzu
 
Hibernate Basic Concepts - Presentation
Hibernate Basic Concepts - PresentationHibernate Basic Concepts - Presentation
Hibernate Basic Concepts - PresentationKhoa Nguyen
 

What's hot (20)

React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOM
 
Spring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOPSpring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOP
 
AEM 6.X (With Basics) Training Syllabus
AEM 6.X (With Basics) Training SyllabusAEM 6.X (With Basics) Training Syllabus
AEM 6.X (With Basics) Training Syllabus
 
Saturn 2018 rest.li
Saturn 2018 rest.liSaturn 2018 rest.li
Saturn 2018 rest.li
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
React js programming concept
React js programming conceptReact js programming concept
React js programming concept
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
AEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentAEM Best Practices for Component Development
AEM Best Practices for Component Development
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101
 
jpa-hibernate-presentation
jpa-hibernate-presentationjpa-hibernate-presentation
jpa-hibernate-presentation
 
Sequelize
SequelizeSequelize
Sequelize
 
Spring bootでweb 基本編
Spring bootでweb 基本編Spring bootでweb 基本編
Spring bootでweb 基本編
 
Spring & hibernate
Spring & hibernateSpring & hibernate
Spring & hibernate
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutes
 
Hibernate Basic Concepts - Presentation
Hibernate Basic Concepts - PresentationHibernate Basic Concepts - Presentation
Hibernate Basic Concepts - Presentation
 
Next.js - ReactPlayIO.pptx
Next.js - ReactPlayIO.pptxNext.js - ReactPlayIO.pptx
Next.js - ReactPlayIO.pptx
 
Spring Batch 2.0
Spring Batch 2.0Spring Batch 2.0
Spring Batch 2.0
 

Similar to A Short Intorduction to JasperReports

Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitJukka Zitting
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repositorynobby
 
03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book SupplementChuong Nguyen
 
Jasper Soft%20 Ap Is
Jasper Soft%20 Ap IsJasper Soft%20 Ap Is
Jasper Soft%20 Ap Isnaveenkumarhp
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC frameworkMohit Gupta
 
Utilized JAXB to generate POJOs automatically
Utilized JAXB to generate POJOs automaticallyUtilized JAXB to generate POJOs automatically
Utilized JAXB to generate POJOs automaticallyGuo Albert
 
Oracle database 11g_and_oraclerac11g_on_ibm
Oracle database 11g_and_oraclerac11g_on_ibmOracle database 11g_and_oraclerac11g_on_ibm
Oracle database 11g_and_oraclerac11g_on_ibmAonjai Khemsuk
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsJazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsEdgar Silva
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malavRohit malav
 
Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021
Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021
Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021StreamNative
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3Oracle
 
Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]santi caltabiano
 
ApacheCon North America 2018: Creating Spark Data Sources
ApacheCon North America 2018: Creating Spark Data SourcesApacheCon North America 2018: Creating Spark Data Sources
ApacheCon North America 2018: Creating Spark Data SourcesJayesh Thakrar
 

Similar to A Short Intorduction to JasperReports (20)

Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
Jasper Soft%20 Ap Is
Jasper Soft%20 Ap IsJasper Soft%20 Ap Is
Jasper Soft%20 Ap Is
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC framework
 
Utilized JAXB to generate POJOs automatically
Utilized JAXB to generate POJOs automaticallyUtilized JAXB to generate POJOs automatically
Utilized JAXB to generate POJOs automatically
 
Java basic
Java basicJava basic
Java basic
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Oracle database 11g_and_oraclerac11g_on_ibm
Oracle database 11g_and_oraclerac11g_on_ibmOracle database 11g_and_oraclerac11g_on_ibm
Oracle database 11g_and_oraclerac11g_on_ibm
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsJazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malav
 
Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021
Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021
Using the JMS 2.0 API with Apache Pulsar - Pulsar Virtual Summit Europe 2021
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]
 
ApacheCon North America 2018: Creating Spark Data Sources
ApacheCon North America 2018: Creating Spark Data SourcesApacheCon North America 2018: Creating Spark Data Sources
ApacheCon North America 2018: Creating Spark Data Sources
 

More from Guo Albert

AWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy SimulatorAWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy SimulatorGuo Albert
 
TOEIC 準備心得
TOEIC 準備心得TOEIC 準備心得
TOEIC 準備心得Guo Albert
 
DBM專案環境建置
DBM專案環境建置DBM專案環境建置
DBM專案環境建置Guo Albert
 
JPA Optimistic Locking With @Version
JPA Optimistic Locking With @VersionJPA Optimistic Locking With @Version
JPA Optimistic Locking With @VersionGuo Albert
 
OCEJPA Study Notes
OCEJPA Study NotesOCEJPA Study Notes
OCEJPA Study NotesGuo Albert
 
OCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation TipsOCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation TipsGuo Albert
 
JPA lifecycle events practice
JPA lifecycle events practiceJPA lifecycle events practice
JPA lifecycle events practiceGuo Albert
 
XDate - a modern java-script date library
XDate -  a modern java-script date libraryXDate -  a modern java-script date library
XDate - a modern java-script date libraryGuo Albert
 
How to avoid check style errors
How to avoid check style errorsHow to avoid check style errors
How to avoid check style errorsGuo Albert
 
NIG系統報表開發指南
NIG系統報表開發指南NIG系統報表開發指南
NIG系統報表開發指南Guo Albert
 
Ease Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History TableEase Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History TableGuo Albert
 
NIG 系統開發指引
NIG 系統開發指引NIG 系統開發指引
NIG 系統開發指引Guo Albert
 
NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟Guo Albert
 
Form Bean Creation Process for NIG System
Form Bean Creation Process for NIG SystemForm Bean Creation Process for NIG System
Form Bean Creation Process for NIG SystemGuo Albert
 
Apply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationApply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationGuo Albert
 
Utilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy objectUtilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy objectGuo Albert
 
Apply my eclipse to do entity class generation
Apply my eclipse to do entity class generationApply my eclipse to do entity class generation
Apply my eclipse to do entity class generationGuo Albert
 
Nig project setup quickly tutorial
Nig project setup quickly tutorialNig project setup quickly tutorial
Nig project setup quickly tutorialGuo Albert
 
Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplateGuo Albert
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkGuo Albert
 

More from Guo Albert (20)

AWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy SimulatorAWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy Simulator
 
TOEIC 準備心得
TOEIC 準備心得TOEIC 準備心得
TOEIC 準備心得
 
DBM專案環境建置
DBM專案環境建置DBM專案環境建置
DBM專案環境建置
 
JPA Optimistic Locking With @Version
JPA Optimistic Locking With @VersionJPA Optimistic Locking With @Version
JPA Optimistic Locking With @Version
 
OCEJPA Study Notes
OCEJPA Study NotesOCEJPA Study Notes
OCEJPA Study Notes
 
OCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation TipsOCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation Tips
 
JPA lifecycle events practice
JPA lifecycle events practiceJPA lifecycle events practice
JPA lifecycle events practice
 
XDate - a modern java-script date library
XDate -  a modern java-script date libraryXDate -  a modern java-script date library
XDate - a modern java-script date library
 
How to avoid check style errors
How to avoid check style errorsHow to avoid check style errors
How to avoid check style errors
 
NIG系統報表開發指南
NIG系統報表開發指南NIG系統報表開發指南
NIG系統報表開發指南
 
Ease Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History TableEase Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History Table
 
NIG 系統開發指引
NIG 系統開發指引NIG 系統開發指引
NIG 系統開發指引
 
NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟
 
Form Bean Creation Process for NIG System
Form Bean Creation Process for NIG SystemForm Bean Creation Process for NIG System
Form Bean Creation Process for NIG System
 
Apply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationApply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report Implementation
 
Utilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy objectUtilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy object
 
Apply my eclipse to do entity class generation
Apply my eclipse to do entity class generationApply my eclipse to do entity class generation
Apply my eclipse to do entity class generation
 
Nig project setup quickly tutorial
Nig project setup quickly tutorialNig project setup quickly tutorial
Nig project setup quickly tutorial
 
Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplate
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
 

Recently uploaded

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

A Short Intorduction to JasperReports

  • 2. 2 Agenda  Introduction  Prerequisites  Typical Workflow  Document Sections (Bands) Overview  JasperReports Architecture
  • 3. 3 Introduction  Open source Java reporting library  Under the Lesser GNU Public License (LGPL)  Since 2001  Backed by a company now, JasperSoft  2007 Duke’s Choice Award Winner
  • 4. 4 Introduction – cont.  Support multiple data sources  Database connection  Embedded SQL statement  Java Collections (Collection, Array and Map)  JDBC result set  Support multiple report formats  PDF, XLS, CSV, HTML, XML, RTF, ODT, TXT
  • 5. 5 Prerequisites  Download Sun Java 2 SDK 1.5 or newer  iReport eats a lot of RAM, and so it is necessary to have at least 256MB of memory and about 20MB of free space on disk  Download iReport from http://sourceforge.net/projects/ireport  Download JasperReports from http://sourceforge.net/projects/jasperreports/files/jasperreport s/
  • 6. 6 Fail to open jrxml by iReport  Problem  As I use iReport 4.0.2 to open jrxml file, but it show this error message:  javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.j ava:134) at org.netbeans.lib.uihandler.LogRecords.scan(LogRecords.java:127) at org.netbeans.modules.uihandler.Installer.getLogs(Installer.java:681) at org.netbeans.modules.uihandler.Installer$Submit.(Installer.java:1317)  Solution  Change your JAVA_HOME to standard JDK instead of IBM JDK.
  • 9. 9 Document Sections (Bands) Overview Document Description Sections title printed only once at the beginning of the report pageHeader printed at the beginning of every page in the report. Column Header printed at the beginning of each detail column Detail corresponds to every record that is read by the datasource that feeds the report Column Footer The column footer band appears at the end of every column. Page Footer The page footer band appears on every page where there is a page header Summary The summary band allows you to insert fields concerning total calculations, means, or whatever you want to insert at the end of the report
  • 14. 14 http://0rz.com/RMSbdY Maven 2 JasperReports Plugin  This plugin provides the capability to compile Jasper Report xml design files.
  • 16. 16 5 Steps to export report Step Description Get data source Input List of value object, and create JRBeanCollectionDataSource Read Jasper Read .jasper file File Generate Read report input stream and create JasperPrint JasperPrint object Set response Assign content type and header based on the content type and export type header Export Report Assign export API to do export based on the export type
  • 17. 17 http://0rz.com/3MrvkI 5 Steps to export report – cont.
  • 18. 18 MS Excel wasn't displaying a CSV file with UTF-8 encoding correctly.
  • 19. 19 MS Excel wasn't displaying a CSV file with UTF-8 encoding correctly.  In the absence of any charset identification, Excel must guess about a file's content encoding. Therefore, Excel uses that default to read and display CSV files. //byte-order marker (BOM) byte b[] = {(byte)0xEF, (byte)0xBB, (byte)0xBF}; //insert BOM byte array into outputStream outputStream.write(b); http://http://0rz.com/QFcaEW