IReport+JasperReports Server development process Troubleshooting

Label JasperReportsIReport
1260 people reading comments(0) Collection Report

The content of this paper is mainly the realization of a subreport masterreport Server successfully in JasperReports (hereinafter referred to as JRS) on the report.

The first is the use of iReport and masterreport were designed in subreport, and preview; and then the two report template to connect to the data source in JasperReports Server, and the final report.

1: No suitable driver found for jdbc:mysql

Background: in the use of iReport report design template, use the subreport of the time, usually after the design of subreport, embedded subreport masterreport, however, when embedded in the subreport, you need to define a connection, such as: java.sql.DriverManager.getConnection ("jdbc:mysql://localhost:3306/dbname", "username", "passwd"), but when the last generation report preview No suitable driver found error For jdbc:mysql.

To solve the problem:

This is a major problem of driver about this, they must be mysql-connector.jar into the correct position:
Can refer to:Http://

One of the main content:
OK, here is the solution for Ubuntu 10.10 with NetBeans 6.8 and 6.9.1, plus iReport, please post here where you find other solutions as well, as this applies on Windows as well.
Forget the classes folder, the driver has to be located in this folder to have it working correctly:
/usr/lib/jvm/java-6-sun-1.6xxxx/jre/lib/ext (XXX for whatever revision you have).

My bag is: mysql-connector-java-5.1.7-bin.jar jar. About the directory address, certainly not exactly the same, depending on the specific circumstances and needs flexible use.

Create MySQL abnormal data source problem when 2:JRS throws Driver not find

Background: when using the iReport design after the two report template, need to implement this functionality in JasperReports Server. We need to create a data source, but after creating a data source in JRS, when trying to connect the test, will display the connection failed, when running the reports error: com.jaspersoft.jasperserver.api.JSExceptionWrapper: com.mysql.jdbc.Driver. It was unable to find a MySQL driver, and it is the default install PostgreSQL driver.

To solve the problem:

On this issue, the official website also has some answers:Http://

Put mysql-connector-5.1.7-bin.jar in the Tomcat directory under the Lib folder, or directory /opt/jasperreports-server-5.0.1/apache-tomcat/lib, and use the Server script to restart the JasperReports (not restart time, also tried, no, maybe JRS just when start loading the driver jar package, rather than dynamic loading)

The problem of 3:subreport migration from iReport to JRS error

Background: in iReport, designed with the main table of subreport, and the preview success, want to move to a JRS report. JRS: create two data sources, create two report, master and sub are respectively connected to a data source, including master sub, eventually creating a table. If directly with normal process operation, error: net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist.

To solve the problem:


Step1. upload the two data sources, masterCon and subCon, and then upload the subreport, and it binds to subCon.

Step2. open the masterreport.jrxml file in the local, on which the configuration of subreport, some need to modify:
<defaultValueExpression><! [CDATA["Repo:subreport"]]></defaultValueExpression>
<subreportExpression><! [CDATA["Repo:subreport"]]></subreportExpression>

Note the red writing format, quotes and colon.

Step3. upload masterreport, and upload subreport.jrxml. If you select the subreport.jasper file. Error: com.jaspersoft.jasperserver.api.JSExceptionWrapper: Invalid byte 1 of 1-byte UTF-8 sequence.

The successful operation of Step4.

Reproduced clearly indicate the source.

This document is more out of my understanding, certainly in some places defects and mistakes. If you are interested in this area, and have better ideas and suggestions, please contact me.

My e-mail:

Sina microblogging:@ lotus Fu Ruqing

Guess you're looking for
View comments
* the above user comments represent the personal views do not represent the views or position of the CSDN website
    personal data
    • Visit82017 times
    • Integral:One thousand three hundred and thirty-one
    • Grade
    • Ranking:18615th
    • Original47
    • Reprint:0
    • Translation:1
    • Comment:49
    Blog column
    Contact information
    The latest comments