Liferay has one portlet which supports Jasper Reports , but that is not free. It is available only for EE edition people.
Luckily we have one portlet which is free and is based on Jasper reports
http://code.google.com/p/aperte-reports/
I have used it on Tomcat based liferay installation.
Some of the steps and things you need to do
* You need PostgreSQL database , it doenst not work with MySQL. The Postgre SQL based database if used to store internal details which are required for this portlet to work. So dont worry if your liferay install is MySQL or any other it can be used freely.
* Install Postgre and create one database which can be used by aperte-reports portlet
Configure JDBC datasource in tomcat
* In your tomcat context , (generally inside ROOT.xml ) add the following information
<Resource name="jdbc/aperte-reports" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/aperteDb" username="postgres" password="root" maxActive="20" maxIdle="10" maxWait="-1"/>
aperteDb is database which i created in Postgre for this portlet
* Download the war file of aperte-reports portlet and deploy it
* Download extra jars from
http://jdbc.postgresql.org/download/postgresql-9.1-901.jdbc4.jar
to tomcat lib/ext folder
* Download Vaadin jar from its website
Also download 3 jars of
Vaadin add-ons:
- MaskedTextField v0.1.1
- ActiveLink v1.0
- CKEditor wrapper for Vaadin v1.0
Restart the tomcat and after your portlet deployment is done , you can go to Aperte Reports manager to import jmxml file of ireports into Liferay to create reports and charts
Thanks for your pioneering work. However, I run into problem(s) when I follow your direction.
ReplyDeleteI notice that I have:
jdbc/aperte-reports
javax.sql.DataSource
Container
in tomcat-6.0.32/webapps/aperte-reports-ui-2.2/WEB-INF/web.xml
I also have:
in tomcat-6.0.32/conf/Catalina/localhost/ROOT.xml (the only thing in this file)
but when I add the report Portlets, the following error messages appear:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
at com.liferay.portal.action.LayoutAction.includeLayoutConten02:37:24,050 ERROR [PortletServlet:97] javax.portlet.PortletException: java.lang.ExceptionInInitializerError
javax.portlet.PortletException: java.lang.ExceptionInInitializerError
Where did make the mistake?
@spencerhuang
ReplyDeleteThe error suggests that portlet is not able to connect to database which is required for him to store its data.
Check your jdbc/aperte-reports settings and make sure postgre database is up.
Hi,
ReplyDeleteAperte Reports v.2.2.2 is available!
Version 2 of Aperte Reports brings many fixes and improvements, including:
reworked user interface
better error reporting and handling
support for Apache Tomcat and JBoss AS
support for common RDBMS: MySQL, PostgreSQL, Oracle, Hypersonic
Also, product documentation has been updated, allowing new users to quickly start using Aperte Reports.
For mor information please go to Google code project site -->
http://code.google.com/p/aperte-reports
What modifications do I need to do if I am using MySql?
ReplyDeleteHere is what I put in my tomcat/conf/CATALINA/localhost/ROOT.xml
Do I need to make any other changes anywhere?
In the step where you mentioned --
Download extra jars from
http://jdbc.postgresql.org/download/postgresql-9.1-901.jdbc4.jar
to tomcat lib/ext folder
What jar should I download for mysql?
And for Vaadin, in which folder should I put the jars?
Thanks in advance!