Questions tagged [jasper-reports]

JasperReports is an open source reporting tool that can be used in all Java applications from desktop to web applications. This tag should always be applied to all question related to this framework, if the question is also related to usage of a specific IDE (jaspersoft-studio or ireport) add the correct one. Only if your question contains back-end code in java/php etc you need to add those as additional tags.

JasperReports

The JasperReports library is an open source reporting application programming interface (API) written in Java. JasperReports can export to screen, printer, PDF, HTML, Microsoft Excel, RTF, ODT, comma-separated values (CSV), and XML formats.

The JasperReports library is used by the main integrated development environments (IDEs) for authoring reports templates: iReport and Jaspersoft Studio, with Jaspersoft Studio having superseded iReport.

How JasperReports Works

There is often some confusion about the relationship between JasperReports, Jaspersoft Studio/iReport, .jrxml files, and .jasper files. Generating a report takes the following general steps:

  1. Typically, reports are designed using iReport or Jaspersoft Studio.
  2. iReport/Jaspersoft Studio saves the source code for reports in XML format with a .jrxml file extension.
  3. Either iReport/Jaspersoft Studio or JasperReports compiles the .jrxml files to .jasper files.
  4. The .jasper files are loaded by JasperReports.
  5. JasperReports fills the compiled report with data from a given data source (such as a database result set).
  6. JasperReports exports the completed report to a specified document format.

Report Design

Jaspersoft Studio is the official design client for JasperReports. It is a stand alone product based on Eclipse and is also available as an Eclipse plugin.

Jaspersoft Studio v5.5.0 has superseded the iReport report designer. You can still use iReport but be aware that the project is now in maintainence-only mode. Follow the Designing a Report guide for an example on how to create a report.

FAQ

JasperReports Library FAQs

Source code

Tutorials

Samples


References


Official Bug Tracker

8464 questions
103
votes
20 answers

Font is not available to the JVM with Jasper Reports

I'm trying to generate report with DynamicJasper, but I'm getting the following error: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. msttcorefonts is…
Andrew
  • 2,663
  • 6
  • 28
  • 50
78
votes
12 answers

How do I compile jrxml to get jasper?

I have jrxml file, I want to compile this to get .jasper. How do I compile and get that jasper file?
Mohamed Saligh
  • 12,029
  • 19
  • 65
  • 84
77
votes
6 answers

Why do I get compilation error "org/codehaus/groovy/control/CompilationFailedException"?

I am trying to compile my JasperReports template using an Ant script and Java. I am getting this error: jasper java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException There is nothing complex in the template, but I…
user726478
50
votes
2 answers

Multiple queries in a single jasper document

Until now I have always been constrained by one thing with jasper-reports. I can only write one data query in each document. When I need to write another query I must create a subreport, pass its needed parameters and so on. But I'm definitely not…
Manuel Leduc
  • 1,849
  • 3
  • 23
  • 39
50
votes
6 answers

PDF Generation Library for Java

I know this has been asked before, but I'm still undecided on which PDF generation framework to use for my current project. My requirements on-the-fly generation of PDF documents (mainly order forms, invoices) Java based easy to layout should be…
Stefan Haberl
  • 9,812
  • 7
  • 72
  • 81
44
votes
3 answers

JasperReports 5.6: JRXlsExporter.setParameter is deprecated

I have this code to export a JasperReprot to XLS: JasperPrint jprint=JasperFillManager.fillReport(expRpg, null, new JRBeanCollectionDataSource(datalist)); JRXlsExporter exporter = new JRXlsExporter(); …
Tobia
  • 9,165
  • 28
  • 114
  • 219
43
votes
7 answers

How to pass main report data source to subreport (JasperReports)?

I'm using JasperReports and I fill the JRDataSource for ther report. Now, I want to pass the main REPORT_DATA_SOURCE to the subreport. How can I do this? As far as I know the REPORT_DATA_SOURCE is a consumable object, so it can only be used once,…
adis
  • 5,901
  • 7
  • 51
  • 71
40
votes
2 answers

How to use JasperReports with Spring MVC?

I've been investigating the use of JasperReports (6.0.0) with Spring MVC (4.1.3) to generate PDF reports. Spring is rife with "Spring specific" ways to integrate with JasperReports to generate PDFs: Use JasperReportsPdfView relies on now deprecated…
Brice Roncace
  • 10,110
  • 9
  • 60
  • 69
40
votes
3 answers

How do I change the locale that JasperReports uses?

The windows installed on my machine has the locale en_AU and that's what JasperReports uses. I already tried changing the locale of all users, including the Administrator but it still uses en_AU. How can I change that locale? Is it possible to…
Francisco Fiuza
  • 421
  • 1
  • 5
  • 4
39
votes
4 answers

JasperReport - wrap text to show long text in textfield

I am using jasper report as reporting tool in my application. And I am wondering how can i wrap the long text by expanding the reportElement dynamically into vertical direction ( expanding the row size, not column width). Or Is there any way to…
gtiwari333
  • 24,554
  • 15
  • 75
  • 102
38
votes
13 answers

Dependency error in jasper-reports from itext

From yesterday I have problems compiling with maven because of iText jar. My project has a dependency of jasperreports-2.0.1 that depends on itext-1.02b or higher. com.lowagie itext
Laura Abad Avilés
  • 776
  • 1
  • 7
  • 16
36
votes
5 answers

Jasper Reports - how to get column footer to appear directly below details band

I'm trying to get a column footer band to appear directly below a details band. The details band contains normally just 2 or 3 rows and thus should not be very deep. The footer always appears further down the page and not directly below the end of…
Peanut
  • 18,967
  • 20
  • 72
  • 78
34
votes
3 answers

Export JasperReport to PDF OutputStream?

I'm writing a pretty simple sample project for familiarizing myself with Jasper Reports. I'd like to export a report I've configured to a PDF OutputStream, but there's no factory method for it: InputStream template = JasperReportsApplication.class …
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
34
votes
4 answers

How to show an image on jasper report?

I want to show an image on a jasper report. I have the following on the .jrxml: The image…
user297339
34
votes
2 answers

How to sum all values in a column in Jaspersoft iReport Designer?

I have below similar report in Jaspersoft iReport Designer, but not able to figure out how to sum all values present in vertical column "Doctor Payment" to get a total of "1601"? Length of this columns is variable (i.e. no of rows vary according to…
Sagar Nikam
  • 1,708
  • 3
  • 22
  • 35
1
2 3
99 100