Enterprise Java

JBoss BRMS with JasperReports for Reporting

Introduction

Jasperreports is a free downloadable library that can be used for generating rich reports for Java EE applications. This guide also provides the steps to generate report templates using Jasper iReport designer.

Software requirements

  • JBoss BRMS 5.3 (from customer portal, http://access.redhat.com)
  • JasperReports 4.6.0
  • Jasper iReports
  • Maven (for building report server)
  • Ant (for building JasperReports)

 
Adding on JasperReports

Just follow these steps to get it up and running.

  1. install JBoss BRMS 5.3 standalone.
  2. create the following directories in in BRMS install
    • $JBOSS_HOME/server/default/data/Jasper
    • $JBOSS_HOME/server/default/data/Jasper/Output
  3. Download (latest) Jasperreports 4.6.0 from the following location
  4. Extract the contents of the downloaded folder in a local directory.
  5. Goto jasperreports-4.6.0-project\jasperreports-4.6.0 directory where the build.xml file resides and do an ant build. This will create the distribution jars at the following location $path_to_jasper\jasperreports-4.6.0-project\jasperreports-4.6.0\dist
    • Jasperreports-applet-4.6.0
    • Jasperreports 4.6.0.jar
    • Jasperreports-fonts-4.6.0
    • Jasperreports-javaflow-4.6.0
  6. Copy the above jars to the following location
    • $JBOSS_HOME\server\default\deploy\gwt-console-server.war\WEB-INF\lib
  7. Get report server code from github repository from the following location
  8. Go to the root directory of the downloaded code and do a maven build: mvn clean install. This will generate the distribution jars; reports-core-1.3.0.jar, report-shared-1.3.0.jar
  9. Copy the two previous jar folders from the dist directory to the $JBOSS_HOME\server\default\deploy\gwt-console-server.war\WEB-INF\lib
  10. Delete the existing reports-core-final-1.4.0 and reports-shared-final-1.4.0 in the $JBOSS_HOME\server\default\deploy\gwt-console-server.war\WEB-INF\lib
  11. Download jasper report templates overall_activity.jasper and overall_activity.jrxml from the following link and copy into $JBOSS_HOME/server/default/data/Jasper
  12. Copy the following library jars from $path_to_jasper\jasperreports-4.6.0-project\jasperreports-4.6.0\lib to the following location $JBOSS_HOME\server\default\deploy\gwt-console- server.war\WEB-INF\lib
    • commons-digester-2.1
    • jfreechart-1.0.12
    • jcommon-1.0.15

 
Customization and editing .jrxml file

  1. Follow the document JasperReports-Ultimate-Guide-3.0 in docs folder at $path_to_jasper/jasperreports-4.6.0-project\jasperreports-4.6.0\docs
  2. Download and install Jasper iReports designer from the following location
  3. Open the overall_activity.jrxml file in the iReports and edit. Save the .jrxml file and compile by clicking on the preview tab. Copy both the .jrxml (only for future reference) and .jasper file to the $JBOSS_HOME/server/default/data/Jasper

Reference: JBoss BRMS 5.3 – Adding on JasperReports for Reporting from our JCG partner Eric D. Schabell at the Thoughts on Middleware, Linux, software, cycling and other news… blog.

Eric Schabell

Eric is Chronosphere's Director Technical Marketing & Evangelism. He's renowned in the development community as a speaker, lecturer, author and baseball expert. His current role allows him to coach the next generation of technical marketers & evangelists helping the world to understand the challenges with cloud native observability. He brings a unique perspective to the stage with a professional life dedicated to sharing his deep expertise of open source technologies and organizations. Follow on https://www.schabell.org.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button