Eric Schabell

About Eric Schabell

Eric D. Schabell is the JBoss technology evangelist for Integration and BPM products at Red Hat. He is a writer, cyclist and software engineer but not always in that order.

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.

Related Whitepaper:

Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions

Get ready to program in a whole new way!

Functional Programming in Java will help you quickly get on top of the new, essential Java 8 language features and the functional style that will change and improve your code. This short, targeted book will help you make the paradigm shift from the old imperative way to a less error-prone, more elegant, and concise coding style that’s also a breeze to parallelize. You’ll explore the syntax and semantics of lambda expressions, method and constructor references, and functional interfaces. You’ll design and write applications better using the new standards in Java 8 and the JDK.

Get it Now!  

Leave a Reply


9 × = eighty one



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

20,709 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books