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

What's hot (20)

Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Oracle reports
Oracle reportsOracle reports
Oracle reports
 
oracle-reports6i
oracle-reports6ioracle-reports6i
oracle-reports6i
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
Building a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootBuilding a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring Boot
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
 
Data extraction and retraction in bpc bi
Data extraction and retraction in bpc biData extraction and retraction in bpc bi
Data extraction and retraction in bpc bi
 
IBM WebSphere application server
IBM WebSphere application serverIBM WebSphere application server
IBM WebSphere application server
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
Tuning for Oracle RAC Wait Events
Tuning for Oracle RAC Wait EventsTuning for Oracle RAC Wait Events
Tuning for Oracle RAC Wait Events
 

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 Jackrabbit
Jukka Zitting
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
nobby
 
Jasper Soft%20 Ap Is
Jasper Soft%20 Ap IsJasper Soft%20 Ap Is
Jasper Soft%20 Ap Is
naveenkumarhp
 
Utilized JAXB to generate POJOs automatically
Utilized JAXB to generate POJOs automaticallyUtilized JAXB to generate POJOs automatically
Utilized JAXB to generate POJOs automatically
Guo 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_ibm
Aonjai Khemsuk
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
Allan 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 Steroids
Edgar Silva
 

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

JPA Optimistic Locking With @Version
JPA Optimistic Locking With @VersionJPA Optimistic Locking With @Version
JPA Optimistic Locking With @Version
Guo Albert
 
OCEJPA Study Notes
OCEJPA Study NotesOCEJPA Study Notes
OCEJPA Study Notes
Guo Albert
 
OCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation TipsOCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation Tips
Guo Albert
 
JPA lifecycle events practice
JPA lifecycle events practiceJPA lifecycle events practice
JPA lifecycle events practice
Guo Albert
 
How to avoid check style errors
How to avoid check style errorsHow to avoid check style errors
How to avoid check style errors
Guo 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 Table
Guo 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 System
Guo 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 Implementation
Guo 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 object
Guo 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 generation
Guo Albert
 
Nig project setup quickly tutorial
Nig project setup quickly tutorialNig project setup quickly tutorial
Nig project setup quickly tutorial
Guo Albert
 
Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplate
Guo Albert
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
Guo 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

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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