MaxCompute allows you to access data from your MaxCompute project in FineReport. You can use simple drag-and-drop operations to create complex reports. This topic describes how to use the MaxCompute JDBC driver to connect FineReport to a MaxCompute project and analyze reports.
Background information
FineReport is an enterprise-level web reporting tool developed by FanRuan Software Co., Ltd. Its zero-code philosophy makes it easy to learn, use, and powerful. You can use simple drag-and-drop operations to create complex reports and meet various requirements, such as a variety of report displays, interactive analysis, data entry, permission management, scheduled jobs, printing and exporting, portal management, and mobile applications. For more information about FineReport, see FineReport.
Prerequisites
Before you begin, ensure the following requirements are met:
You have created a MaxCompute project.
For more information about how to create a MaxCompute project, see Create a MaxCompute project.
You have an AccessKey ID and an AccessKey Secret with permissions to access the MaxCompute project.
Go to the AccessKey Management page to obtain an AccessKey ID and an AccessKey Secret.
You have installed FineReport (v10.0 or later), which has a built-in MaxCompute Connector.
For more information about how to install and start FineReport, see Designer Installation.
This topic uses FineReport v10.0 as an example.
You have downloaded the MaxCompute JDBC driver (v3.2.8 or later), which is packaged as the
jar-with-dependenciesJAR package.This topic uses MaxCompute JDBC driver v3.2.9 as an example.
Procedure
Follow these steps to connect FineReport to MaxCompute:
Step 1: Place the MaxCompute JDBC driver
Place the MaxCompute JDBC driver JAR package in the FineReport driver directory so that FineReport can use this driver to access your MaxCompute project.
Step 2: Connect FineReport to MaxCompute
Configure the connection parameters to connect FineReport to your MaxCompute project.
Step 3: Use FineReport to query and analyze data
Access and visually analyze data from your MaxCompute project in FineReport.
Step 1: Place the MaxCompute JDBC driver
Optional: If the
xercesImpl.jarfile exists in the%FineReport%\libdirectory, download xercesImpl-2.11.0.jar and use it to replace the existingxercesImpl.jarfile.If the
xercesImpl.jarfile does not exist in the directory, skip this step.Place the downloaded MaxCompute JDBC driver JAR package,
odps-jdbc-3.2.9-jar-with-dependencies.jar, in the%FineReport%\webapps\webroot\WEB-INF\libdirectory.
Step 2: Connect FineReport to MaxCompute
Start FineReport.
From the top menu bar, choose .

In the Define Data Connection dialog box, click the
icon, select JDBC, and configure the following parameters.
Parameter
Description
Database
Select Others from the drop-down list.
Driver
The driver used to connect to the MaxCompute project. The value is fixed at com.aliyun.odps.jdbc.OdpsDriver. You must enter this value manually. You cannot select it from a drop-down list.
User name
The AccessKey ID that has permissions to access the target MaxCompute project.
Go to the AccessKey Management page to obtain the AccessKey ID.
Password
The AccessKey Secret that corresponds to the AccessKey ID.
Go to the AccessKey Management page to obtain the AccessKey Secret.
URL
The URL used to connect to the MaxCompute project. The format is
jdbc:odps:<MaxCompute_endpoint>?project=<MaxCompute_project_name>[&interactiveMode={true|false}]. When you configure the URL, remove the angle brackets (<>). The parameters are as follows:- <MaxCompute_endpoint>: Required. The endpoint of the region where your MaxCompute project is located.
For information about the endpoints for each region, see Endpoints.
- <MaxCompute_project_name>: Required. The name of your MaxCompute project.
This is the name of the MaxCompute project, not the workspace name. You can log on to the MaxCompute console, switch to the correct region in the upper-left corner, and then find the project name on the Project Management tab.
- interactiveMode: Optional. Enables or disables the query acceleration feature.
To enable the query acceleration feature, append
&interactiveMode=trueto the URL. For more information about the query acceleration feature, see Query acceleration.
Encoding
We recommend selecting UTF-8.
- <MaxCompute_endpoint>: Required. The endpoint of the region where your MaxCompute project is located.
Above the parameters, click Test Connection. After the connection is successful, click OK to save the connection.
If you encounter issues with the connection, see Data Connection FAQ.
NoteWhen you test the connection, we recommend that you click Advanced, click Connection Pool Attributes, and set Validate Connection Before Checkout to No. Otherwise, the connection test might be slow.
Step 3: Query and analyze data
In FineReport, you can query and analyze data from the connected MaxCompute project. FineReport saves and displays the data as a two-dimensional table in the dataset management panel. For detailed instructions, see FineReport Help.
View all tables
On the FineReport page, click the
icon, select Database Query, and then select the data connection that you created in Step 2. FineReport automatically loads all tables from the MaxCompute project.
View the table schema
On the FineReport page, click the
icon, select Database Query, and then select the data connection that you created in Step 2. After you write an SQL query, you can view the table schema in the Template Dataset area.
NoteIf you receive a "Dataset configuration error" message, see Usage notes for a solution.
View table data
On the FineReport page, click the
icon, select Database Query, and then select the data connection that you created in Step 2. After you write an SQL query, you can click the
icon to view the table data.
Visualize data
After you create a database query, you can click the
icon on the right, insert elements, and configure their properties to analyze data based on your business needs.



