A data source is a resource in the repository that specifies how and where to obtain the data displayed by reports and OLAP views. Administrators must define data sources before uploading reports that rely on them. Typically, a data source specifies the URI of the database server and the details you need to access it, such as a user name and password.
JasperReports Server provides data source types for relational databases, most flavors of big data, and for specialized data such as Amazon Web Services and JavaBean data. Virtual data sources allow you to combine several data sources into one.
JasperReports Server can access any relational database that supports the SQL query language through the JDBC (Java DataBase Connectivity) API. In this case, you can configure two types of data sources in the repository:
| • | JDBC data source – Establishes a direct connection to the database server using its JDBC driver. After installation, JasperReports Server includes JDBC drivers to access MySQL and PostgreSQL. If you want to install drivers for other databases, or if you want to use alternate drivers, the administrator can upload and manage JDBC drivers through the UI. With JDBC data sources, JasperReports Server configures and manages the connections to the database. By default, the maximum number of simultaneous connections for each data source is 20. |
| • | JNDI data source – Relies on the JNDI (Java Naming and Directory Interface) service of your application server to access a database connection. You must first configure your application server to install its JDBC drivers and configure its database connections. With JNDI data sources, the configuration of the application server determines the number of shared connections. Note that the application server connects to the database using JDBC, meaning that JNDI data sources are available for all databases that support JDBC. |
JasperReports Server also supports some specialized data sources:
| • | Amazon Web Services (AWS) data source – Accesses data stored in your AWS data store using JasperReports Server, either on-premises or in the cloud. |
| • | Microsoft Azure SQL data source - Allows you to access data stored in your Azure SQL Server database. |
| • | XLS and XLSX data sources – Allows you to generate reports based on data in the XLS and XLSX formats. |
| • | Bean data source – Allows you to access data encapsulated in JavaBeans. |
This chapter contains the following sections:
Recommended Comments
There are no comments to display.