Create Reports Using JasperSoft Studio - IDempiere en
Create Reports Using JasperSoft Studio - IDempiere en
This guide explains how to use JasperSoft Studio to create complex reports and print-outs for use by the
JasperReports engine embedded in iDempiere. This is an alternative to using the standard built-in reports described
here.
Contents
1 Introduction
2 How to do it
2.1 JasperSoft Studio
2.2 Create a report
2.2.1 Database Adapter
2.2.2 Design the report
2.2.3 Compile the report
2.3 Installing the report
3 References
Introduction
The standard reporting mechanism is suitable for simple reports, but creating complex reports with sophisticated
layouts can be difficult and time-consuming using the built-in Print Format tools, so rather use JasperSoft Studio to
do the design of sophisticated reports and print-outs with professionally designed layouts, fonts, colours and logos,
then load the JRXML report definition into iDempiere for execution by the JasperReports engine.
How to do it
JasperSoft Studio
If you have not already done so, install JasperSoft Studio:
Download and install the Community Edition of JasperSoft Studio from the download page
(https://community.jaspersoft.com/project/jaspersoft-studio) (note: don't download the older iReport
Designer as this has been deprecated in favour of JasperSoft Studio);
Follow the installation instructions here (https://community.jaspersoft.com/documentation/tibco-jaspersoft-
studio-user-guide/v640/installing-jaspersoft-studio). JasperSoft Studio is built on the same framework as the
Eclipse IDE so the installation and usage is the same
(https://community.jaspersoft.com/documentation/v640/tibco-jaspersoft-studio-user-guide).
Create a report
http://wiki.idempiere.org/w-en/index.php?title=Create_reports_using_JasperSoft_Studio&printable=yes 1/3
5/4/2018 Create reports using JasperSoft Studio - iDempiere en
Database Adapter
The first step is to create a database adapter to connect JasperSoft Studio to your instance of the iDempiere
database server:
This only has to be done once. Thereafter you will use the same adapter to develop your reports.
SELECT a.documentno, a.docstatus, b.name, b.logo_id FROM adempiere.c_invoice a, adempiere.c_bpartner b WHERE a.c_bpartner_id
Follow the video (https://www.youtube.com/watch?v=qupDLprUoJE) to complete the design of the report, and see
the JasperSoft Studio documentation (https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-
user-guide/v640/getting-started-jaspersoft-studio) for more details.
When you are done, compile the report for use by iDempiere:
http://wiki.idempiere.org/w-en/index.php?title=Create_reports_using_JasperSoft_Studio&printable=yes 2/3
5/4/2018 Create reports using JasperSoft Studio - iDempiere en
This will generate the report binary file Invoice.jasper from the resource Invoice.jrxml. This is the file that you will
upload to iDempiere (see below). Note that you can upload either the binary .jasper or the XML description
.JRXML because iDempiere understands both, but the binary may be more efficient, and it may avoid version
inconsistencies between the JasperReports compiler in iDempiere and the one in JasperSoft Studio.
Login as System/System
Select Report & Process and create a new entry:
Search Key: InvoiceJasperReport
Name: InvoiceJasperReport
Data Access Level: Client+Organisation (it is not useful to the System user)
Report: check the box for completeness
Class Name: org.compiere.report.ReportStarter (note that this is case sensitive)
Jasper Report: attachment:Invoice.jasper (this is the binary that was created above)
Save the record
Now click on the Attachment icon (the paperclip on the toolbar) and load the binary from the
JaspersoftWorkspace. This ensures that the binary is stored in the database with the Report Process record
and will get backed up with the database.
References
Creating reports using JasperReports
Evenos video about JasperSoft Studio (https://www.youtube.com/watch?v=qupDLprUoJE)
JasperSoft Studio Guide (https://community.jaspersoft.com/documentation/v640/tibco-jaspersoft-studio-
user-guide)
Making fonts available to your JasperReports
http://wiki.idempiere.org/w-en/index.php?title=Create_reports_using_JasperSoft_Studio&printable=yes 3/3