Menu
Home
Log in / Register
 
Home arrow Computer Science arrow Building Applications with Scala
Source

Creating Reports

Up until now, we learned how to bootstrap our application using Activator, develop our web application using the Scala and Play framework, and a add reactive microservices call using RxScala for data flow computations. We also performed unit test and controller testing using the BDD and Play framework. Then, we persisted data into MySQL using Slick. Now we will move on with our application.

In this chapter, you will learn how to write reports with JasperReports. JasperReports is a very solid reporting solution for Java, and it can be used in Scala very easily. We will create database reports using Jasper, and change our application to have such functionality.

In this chapter, we will cover the following topics:

  • • Understanding JasperReports
  • • Adding database reports to our application

Introducing JasperReports

JasperReports (http://community.jaspersoft.com/project/jasperreports-library) is a very popular and solid reports solution that can generate reports in several formats, such as:

  • • HTML
  • • Excel
  • • Word
  • • Open Office format
  • • PDF

In order to get your reports, you have a visual tool called Jaspersoft Studio, in which you can drag and drop elements such as labels, images, data fields, and much more. Jasper will store this metadata (the report definition) in an XML file, also known as JRXML. If you want, you can edit and work with this XML without any editor; however, it is way better to use the Jaspersoft Studio tool to gain productivity.

Jasper can work with several data sources, such as databases, XML, or even objects in memory. For this book, we will use the database datasource to access our MySQL database.

 
Source
Found a mistake? Please highlight the word and press Shift + Enter  
< Prev   CONTENTS   Next >
 
Subjects
Accounting
Business & Finance
Communication
Computer Science
Economics
Education
Engineering
Environment
Geography
Health
History
Language & Literature
Law
Management
Marketing
Mathematics
Political science
Philosophy
Psychology
Religion
Sociology
Travel