SlideShare uma empresa Scribd logo
1 de 13
Jasper
Reports
Presented By-: Aayush Chimaniya
Content
• What Is Report
• Introduction Of Jasper Reports
• Structure Of Report Template
• Features Of Jasper Reports
• Jasper Reports LifeCycle
• Some Classes Use To Create A Jasper Reports
• Useful Element To Represent Values In A Jasper Report
• How To Create Jasper Report Design
• Virtualizers(Generating Very Large Documents Using Report Virtualizers)
• Our Agenda
What Is Report
• Reports represent usual messy data into charts, graphs, and other
forms of graphical representations.
Introduction Of Jasper Reports
• First We should know JasperReports Is a java process
• It is an open source java reporting engine.
• It is a Java class library, and it is meant for those Java developers who need to add
reporting capabilities to their applications.
• In this tutorial we will covers almost all the basics of JasperReports that atleast a
beginner should know before working with JasperReports.
Structure Of Report Template
• Title contains the 'Title' of the report. It appears only once at the very beginning of the report.
For example, Title of the report is "Student Report"
• PageHeader may contain date and time information or organization name. This appears at the top of each
page.
For example: Page header heading will be “Student Records”
• ColumnHeader lists the names of those specific fields, which you want to display in the report,
For example, "Student Id," "Student Name," "Student Address" etc.
• Detail is the part where entries of the specific fields are shown,
For example Student Id=101, Student Name="Den Peek", Student Address="Pune"
• ColumnFooter may display Sum of any of the field
For example, "Total Hours Study: 6 hours in a day"
• PageFooter may contain page count information. It appears at the bottom of each page,
For example, "Page Number is 1,2,3 and all"
Structure Of Report Template
Features Of Jasper Reports
• Some of the significant features of JasperReports are −
• It has a flexible report layout.
• It can present data either textually or graphically.
• Developers can supply data in multiple ways.
• It can accept data from the multiple data sources.
• It can generate watermarks
• It can generate sub reports.
• It is capable of exporting reports in a variety of formats.
like(PDF,XML,CSV,HTML,XLS,etc)
Jasper Reports LifeCycle
The main purpose of JasperReports is to create- page oriented, ready to print documents in a simple
and flexible manner-:
Step1)Designing the report − In this step we, create the JRXML file, which is an XML document that
contains the definition of the report layout, we have some tools to design report are like (jaspersoft
studio & iReport Designer)
Step2)Compiling the report − In this step, JRXML is compiled in a binary object called a Jasper file with
extension (*.jasper). This compilation is done for performance reasons.
Step3)Executing the report (Filling data into the report) − In this step, data from the application is filled
in the compiled report. We have a class name JasperFillManager provides necessary functions to fill the
data in the reports. A Jasper print file with extension (.jrprint) is created, which can be used either to
print or export the report.
Step4)Exporting the report to desired format − In this step, we can export the Jasper report file to any
format using JasperExportManager class.
Jasper provides various forms of exports with the same jasper design like (PDF,XML,CSV,HTML,XLS,etc..)
Some Classes Use To Create A Jasper Reports
There are number of classes, which will be used to compile a JRXML report design, to fill a report, to print a report, to export to PDF,
HTML & XML files etc.
Which are present in(net.sf.jasperreports.engine) package
• JasperCompileManager − Used to compile a JRXML report template.
• JasperFillManager − Used to fill a report with data from the data source.
• JasperPrintManager − Used to print the documents generated by the JasperReports library.
• JasperExportManager − Used to obtain PDF, HTML, or XML content for the documents produced by the report-filling process.
Useful Element To Represent Values In A Jasper Report
Parameter: $P
$P{parameter_name}
-it is used for single values on the report
-The data which cannot be passed through the data source, can be passed by using parameters. Data like title of the report, etc.
-A JasperReports template or JRXML template can have zero or more parameter elements.
Field: $F
$F{field_name}
-Report fields are elements, which represent mapping of data between datasource and report template.
-it is used to change the value on every iteration
-or we can say it is used to represent a row data in the table
Variable: $V
$V{variable_name}
-it is provided by jasper report.
-it is also used to perform some calculation on jasper report like arithmetic operations,etc.
How To Create Jasper Report Design
Steps To Design And Genrate A Jasper Reports Are As Follows-:
- Design-: For Design Or Create A Jasper Report We Will Use Tibco Jaspersoft Studio Tool
- Copy Report To Project-: Copy That Report Format To Your Java Project
- Dependency-: Add JasperSoft Dependency To Your Java Project
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.9.0</version>
</dependency>
- Read that jasper report file in java program
- Compile The Report
- Create A Datasource
- Pass That Datasource To FILLMANAGER to Fill That Report
- Export The Report In The Required Format
- But Before Moving Forward You May Get An OutOfMemoryError If You Have Huge Amount Of Data So We Will Overcome With
This Problem With The Help Of Virtualizer So We Will Discuss First What Is Virutalizer.
Generating Very Large Documents Using Report Virtualizers
Why We Need A Virtualization?
-A Jasper Report Goes Through 3 Stages In His LifeCycle Compilation, Filling, Exporting
-In each stage objects are generated in memory. During the filling stages especially many no of objects
can be generated if you have large amount of data.
-In this situation, there is always the risk of getting an Out of Memory error before the Filling
of the report has concluded. To overcome from this problem we will use Virtualizers.
What is Virtualization?
Virtualization is a feature that allows for some of the objects that would be stored in memory during
the filling stage to be stored on the file system instead.
The virtualizer is a simple interface JRVirtualizer
So How To Use It?
-create the virtualizer JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "tmp");
The JRFileVirtualizer is created with a maxSize of 2 and "tmp" as the name of the directory to store data.
-Preparingparameters Map parameters = new HashMap();
parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);
Our Agenda
We Will Create A Sample Of Jasper Report-:
We Have Some Student Records In database-:
We Will Design A Jasper Report And Represent All The Records In Jasper Report In Format Of PDF,HTML & XML
Thank You

Mais conteúdo relacionado

Mais procurados

Jasper Reports
Jasper ReportsJasper Reports
Jasper ReportsEnkitec
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorialMohammed Fazuluddin
 
The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!Baharika Sopori
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JSArno Lordkronos
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITnamespaceit
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSKnoldus Inc.
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentationBojan Golubović
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSHoang Long
 
IBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginnersIBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginnersShubham Gupta
 
React state
React  stateReact  state
React stateDucat
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation洪 鹏发
 

Mais procurados (20)

Jasper Reports
Jasper ReportsJasper Reports
Jasper Reports
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
 
The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
React js
React jsReact js
React js
 
Reactjs
ReactjsReactjs
Reactjs
 
JavaScript
JavaScriptJavaScript
JavaScript
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
ReactJS
ReactJSReactJS
ReactJS
 
IBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginnersIBM Websphere introduction and installation for beginners
IBM Websphere introduction and installation for beginners
 
JasperReport
JasperReportJasperReport
JasperReport
 
Spring Batch 2.0
Spring Batch 2.0Spring Batch 2.0
Spring Batch 2.0
 
React state
React  stateReact  state
React state
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 

Semelhante a Jasper Reports.pptx

XMLPublisher
XMLPublisherXMLPublisher
XMLPublisherJAYAARC
 
Demo Guidebook 040110
Demo Guidebook 040110Demo Guidebook 040110
Demo Guidebook 040110Brad Ganas
 
Jasper Soft%20 Ap Is
Jasper Soft%20 Ap IsJasper Soft%20 Ap Is
Jasper Soft%20 Ap Isnaveenkumarhp
 
Gain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring BatchGain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring BatchInexture Solutions
 
CRUD Operation of images through XML
CRUD Operation of images through XMLCRUD Operation of images through XML
CRUD Operation of images through XMLAnshudha Maheshwari
 
Informatica Interview Questions & Answers
Informatica Interview Questions & AnswersInformatica Interview Questions & Answers
Informatica Interview Questions & AnswersZaranTech LLC
 
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces..."Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...hamidsamadi
 
Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0Quang Ngoc
 
Building Dashboards in JMP.pptx
Building Dashboards in JMP.pptxBuilding Dashboards in JMP.pptx
Building Dashboards in JMP.pptxPrasadPatil250675
 
Pnbhfl training final
Pnbhfl training finalPnbhfl training final
Pnbhfl training finalNupur Mishra
 
javascriptPresentation.pdf
javascriptPresentation.pdfjavascriptPresentation.pdf
javascriptPresentation.pdfwildcat9335
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Tjarda Peelen
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Lucas Jellema
 

Semelhante a Jasper Reports.pptx (20)

Fh24984988
Fh24984988Fh24984988
Fh24984988
 
XMLPublisher
XMLPublisherXMLPublisher
XMLPublisher
 
Demo Guidebook 040110
Demo Guidebook 040110Demo Guidebook 040110
Demo Guidebook 040110
 
SAP Business Objects Trianing
SAP Business Objects TrianingSAP Business Objects Trianing
SAP Business Objects Trianing
 
Jasper Soft%20 Ap Is
Jasper Soft%20 Ap IsJasper Soft%20 Ap Is
Jasper Soft%20 Ap Is
 
Gain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring BatchGain Proficiency in Batch Processing with Spring Batch
Gain Proficiency in Batch Processing with Spring Batch
 
CRUD Operation of images through XML
CRUD Operation of images through XMLCRUD Operation of images through XML
CRUD Operation of images through XML
 
Dbms fast track 2/3
Dbms fast track 2/3Dbms fast track 2/3
Dbms fast track 2/3
 
Informatica Interview Questions & Answers
Informatica Interview Questions & AnswersInformatica Interview Questions & Answers
Informatica Interview Questions & Answers
 
Sap Business Objects solutioning Framework architecture
Sap Business Objects solutioning Framework architectureSap Business Objects solutioning Framework architecture
Sap Business Objects solutioning Framework architecture
 
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces..."Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
 
crystal report
crystal reportcrystal report
crystal report
 
Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0
 
Building Dashboards in JMP.pptx
Building Dashboards in JMP.pptxBuilding Dashboards in JMP.pptx
Building Dashboards in JMP.pptx
 
Pnbhfl training final
Pnbhfl training finalPnbhfl training final
Pnbhfl training final
 
Lecture 5 javascript
Lecture 5 javascriptLecture 5 javascript
Lecture 5 javascript
 
javascriptPresentation.pdf
javascriptPresentation.pdfjavascriptPresentation.pdf
javascriptPresentation.pdf
 
synopsis
synopsissynopsis
synopsis
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
 

Mais de Aayush Chimaniya

Microservices Api Gateway Eureka Server.pptx
Microservices Api Gateway Eureka Server.pptxMicroservices Api Gateway Eureka Server.pptx
Microservices Api Gateway Eureka Server.pptxAayush Chimaniya
 
Java SpringMVC SpringBOOT (Divergent).ppt
Java SpringMVC SpringBOOT (Divergent).pptJava SpringMVC SpringBOOT (Divergent).ppt
Java SpringMVC SpringBOOT (Divergent).pptAayush Chimaniya
 
Asynchronous Programming.pptx
Asynchronous Programming.pptxAsynchronous Programming.pptx
Asynchronous Programming.pptxAayush Chimaniya
 

Mais de Aayush Chimaniya (6)

Microservices Api Gateway Eureka Server.pptx
Microservices Api Gateway Eureka Server.pptxMicroservices Api Gateway Eureka Server.pptx
Microservices Api Gateway Eureka Server.pptx
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 
Java SpringMVC SpringBOOT (Divergent).ppt
Java SpringMVC SpringBOOT (Divergent).pptJava SpringMVC SpringBOOT (Divergent).ppt
Java SpringMVC SpringBOOT (Divergent).ppt
 
Asynchronous Programming.pptx
Asynchronous Programming.pptxAsynchronous Programming.pptx
Asynchronous Programming.pptx
 
SADBlood Bank.pdf
SADBlood Bank.pdfSADBlood Bank.pdf
SADBlood Bank.pdf
 
Electric Vehicle
Electric VehicleElectric Vehicle
Electric Vehicle
 

Último

The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
Sourcing Success - How to Find a Clothing Manufacturer
Sourcing Success - How to Find a Clothing ManufacturerSourcing Success - How to Find a Clothing Manufacturer
Sourcing Success - How to Find a Clothing ManufacturerWave PLM
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfMehmet Akar
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems ApproachNeo4j
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationHelp Desk Migration
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfVictor Lopez
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024Shane Coughlan
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)Max Lee
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Gáspár Nagy
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Primacy Infotech
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfDeskTrack
 

Último (20)

The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Sourcing Success - How to Find a Clothing Manufacturer
Sourcing Success - How to Find a Clothing ManufacturerSourcing Success - How to Find a Clothing Manufacturer
Sourcing Success - How to Find a Clothing Manufacturer
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
What is an API Development- Definition, Types, Specifications, Documentation.pdf
What is an API Development- Definition, Types, Specifications, Documentation.pdfWhat is an API Development- Definition, Types, Specifications, Documentation.pdf
What is an API Development- Definition, Types, Specifications, Documentation.pdf
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 

Jasper Reports.pptx

  • 2. Content • What Is Report • Introduction Of Jasper Reports • Structure Of Report Template • Features Of Jasper Reports • Jasper Reports LifeCycle • Some Classes Use To Create A Jasper Reports • Useful Element To Represent Values In A Jasper Report • How To Create Jasper Report Design • Virtualizers(Generating Very Large Documents Using Report Virtualizers) • Our Agenda
  • 3. What Is Report • Reports represent usual messy data into charts, graphs, and other forms of graphical representations. Introduction Of Jasper Reports • First We should know JasperReports Is a java process • It is an open source java reporting engine. • It is a Java class library, and it is meant for those Java developers who need to add reporting capabilities to their applications. • In this tutorial we will covers almost all the basics of JasperReports that atleast a beginner should know before working with JasperReports.
  • 5. • Title contains the 'Title' of the report. It appears only once at the very beginning of the report. For example, Title of the report is "Student Report" • PageHeader may contain date and time information or organization name. This appears at the top of each page. For example: Page header heading will be “Student Records” • ColumnHeader lists the names of those specific fields, which you want to display in the report, For example, "Student Id," "Student Name," "Student Address" etc. • Detail is the part where entries of the specific fields are shown, For example Student Id=101, Student Name="Den Peek", Student Address="Pune" • ColumnFooter may display Sum of any of the field For example, "Total Hours Study: 6 hours in a day" • PageFooter may contain page count information. It appears at the bottom of each page, For example, "Page Number is 1,2,3 and all" Structure Of Report Template
  • 6. Features Of Jasper Reports • Some of the significant features of JasperReports are − • It has a flexible report layout. • It can present data either textually or graphically. • Developers can supply data in multiple ways. • It can accept data from the multiple data sources. • It can generate watermarks • It can generate sub reports. • It is capable of exporting reports in a variety of formats. like(PDF,XML,CSV,HTML,XLS,etc)
  • 7. Jasper Reports LifeCycle The main purpose of JasperReports is to create- page oriented, ready to print documents in a simple and flexible manner-: Step1)Designing the report − In this step we, create the JRXML file, which is an XML document that contains the definition of the report layout, we have some tools to design report are like (jaspersoft studio & iReport Designer) Step2)Compiling the report − In this step, JRXML is compiled in a binary object called a Jasper file with extension (*.jasper). This compilation is done for performance reasons. Step3)Executing the report (Filling data into the report) − In this step, data from the application is filled in the compiled report. We have a class name JasperFillManager provides necessary functions to fill the data in the reports. A Jasper print file with extension (.jrprint) is created, which can be used either to print or export the report. Step4)Exporting the report to desired format − In this step, we can export the Jasper report file to any format using JasperExportManager class. Jasper provides various forms of exports with the same jasper design like (PDF,XML,CSV,HTML,XLS,etc..)
  • 8. Some Classes Use To Create A Jasper Reports There are number of classes, which will be used to compile a JRXML report design, to fill a report, to print a report, to export to PDF, HTML & XML files etc. Which are present in(net.sf.jasperreports.engine) package • JasperCompileManager − Used to compile a JRXML report template. • JasperFillManager − Used to fill a report with data from the data source. • JasperPrintManager − Used to print the documents generated by the JasperReports library. • JasperExportManager − Used to obtain PDF, HTML, or XML content for the documents produced by the report-filling process.
  • 9. Useful Element To Represent Values In A Jasper Report Parameter: $P $P{parameter_name} -it is used for single values on the report -The data which cannot be passed through the data source, can be passed by using parameters. Data like title of the report, etc. -A JasperReports template or JRXML template can have zero or more parameter elements. Field: $F $F{field_name} -Report fields are elements, which represent mapping of data between datasource and report template. -it is used to change the value on every iteration -or we can say it is used to represent a row data in the table Variable: $V $V{variable_name} -it is provided by jasper report. -it is also used to perform some calculation on jasper report like arithmetic operations,etc.
  • 10. How To Create Jasper Report Design Steps To Design And Genrate A Jasper Reports Are As Follows-: - Design-: For Design Or Create A Jasper Report We Will Use Tibco Jaspersoft Studio Tool - Copy Report To Project-: Copy That Report Format To Your Java Project - Dependency-: Add JasperSoft Dependency To Your Java Project <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.9.0</version> </dependency> - Read that jasper report file in java program - Compile The Report - Create A Datasource - Pass That Datasource To FILLMANAGER to Fill That Report - Export The Report In The Required Format - But Before Moving Forward You May Get An OutOfMemoryError If You Have Huge Amount Of Data So We Will Overcome With This Problem With The Help Of Virtualizer So We Will Discuss First What Is Virutalizer.
  • 11. Generating Very Large Documents Using Report Virtualizers Why We Need A Virtualization? -A Jasper Report Goes Through 3 Stages In His LifeCycle Compilation, Filling, Exporting -In each stage objects are generated in memory. During the filling stages especially many no of objects can be generated if you have large amount of data. -In this situation, there is always the risk of getting an Out of Memory error before the Filling of the report has concluded. To overcome from this problem we will use Virtualizers. What is Virtualization? Virtualization is a feature that allows for some of the objects that would be stored in memory during the filling stage to be stored on the file system instead. The virtualizer is a simple interface JRVirtualizer So How To Use It? -create the virtualizer JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "tmp"); The JRFileVirtualizer is created with a maxSize of 2 and "tmp" as the name of the directory to store data. -Preparingparameters Map parameters = new HashMap(); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);
  • 12. Our Agenda We Will Create A Sample Of Jasper Report-: We Have Some Student Records In database-: We Will Design A Jasper Report And Represent All The Records In Jasper Report In Format Of PDF,HTML & XML