Go Back   CORTEX Forums > Best Practices > Subject Matter Expertise > Data Integration Forum > Data Integration News Feeds
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Book Review : Pentaho Reporting 3.5 for Java Developers

This is a discussion on Book Review : Pentaho Reporting 3.5 for Java Developers within the Data Integration News Feeds forums, part of the Data Integration Forum category; Hi Pentaho fans, These are exciting times for Pentaho for sure.* These are also extremely busy times.* However, that doesn’t mean we can’t look around once in a while.* Today ...


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 25th November 2009, 10:39 AM   #1
News Bot
 
Join Date: Nov 2007
Posts: 15,067
Latest News Headlines is on a distinguished road
Post Book Review : Pentaho Reporting 3.5 for Java Developers

Hi Pentaho fans,

These are exciting times for Pentaho for sure.* These are also extremely busy times.* However, that doesn’t mean we can’t look around once in a while.* Today we’ll take a quick look at a new book that arrived on my doorstep a few weeks ago.* It’s titled
Pentaho Reporting 3.5 for Java Developers

I’m very pleased to be able to review this book as it is written by one of the smartest but more importantly also one of the nicest people at Pentaho: Will Gorman.* Not only that, he apparently had help from KC (Kurtis Cruzada) and Jem (Matzan) completing the dream team for this book.

And what a great book it turned out to be.* It covers pretty much everything from basic reporting, over mobile reporting, calculations and formula, sub-reporting, cross-tabs, charting down to the Java API.

Obviously, this book as been reviewed many times before by various people and websites. (Yes, it’s that popular)** To me that means that I can’t just do a quick review, I’m going to have to actually use and read the book.* And that’s what we’ll do today for this review.
We’re going to create a report in the form of a PDF.* The data for the report comes from a Kettle transformation.* We’re going to do it with my favorite programming language (Java) and a complete stack of Open Source Software…

I began by creating a new Eclipse project called KettleBook, download the source over here.
To make sure I didn’t miss any library dependencies, I used the complete “lib” folder of Pentaho Report Designer 3.5 as my class path. (not included in the download)

First, I went to Chapter 10 in the book and started reading the paragraph titled “Building a report using Pentaho Reporting’s API” as that seems to fit the bill. (page 266)

That part explains plain and simple how to create a new Master Report, how data sources work.* But wait, I don’t want a DefaultTableModel, I want to read from Kettle!* Well, a few page flips later we find ourselves on page 143 reading about the KettleDataFactory.* That got me quite far actually as the sample is quite descriptive.

So then I created a small transformation to read from a sample customer file using Pentaho Data Integration 3.2.* This is it:



It reads 100 rows of sample customer data, filters out the people from California, Florida and New York state.* That gives us 91 records.* We’re going to read from the RESULT step placeholder.

The part on page 147 I needed was this block:
KettleTransFromFileProducer producer = new KettleTransFromFileProducer("Customer data", transFile, stepName, "", "", new String[0], new ParameterMapping[0]);KettleDataFactory factory = new KettleDataFactory();factory.setQuery("default", producer);
This part describes a producer to the engine.

I then proceeded on page 269 and put a document header and footer on the report and an item band.* Then I put 4 columns on the page and the report was written.* This took me all of about 30 minutes. The nice folks at Pentaho Orlando will have to forgive me, reporting is not my specialty. Personally I was quite pleased that it was that easy to do.

So, with the report definition ready, I now wanted to create an actual PDF out of that.* More reading revealed that we needed a PDF Output processor (to generate the actual file) and a page-able report processor to paginate and process the report definition.* This is how it looks in my case:
* FileOutputStream fos = new FileOutputStream("files/output.pdf");DefaultConfiguration configuration = new DefaultConfiguration();PdfOutputProcessor processor = new PdfOutputProcessor(configuration, fos);PageableReportProcessor reportProcessor = new PageableReportProcessor(report, processor);reportProcessor.processReport();
5 lines of code to generate a PDF! Suffice it to say I was very happy.

In total I spent a little over an hour to produce this document:



It’s quite simple: if it weren’t for the book I would have a really hard time figuring out where to begin.* I probably would have had to talk to Thomas Morgner, the brain child of Pentaho Reporting.* A nice fellow as he is, communicating to him is not for the faint hearted. (Fortunately he recently moved to Ireland so things will get better soon)

All joking aside, if you are planning to create reports using the Java API, do yourself a favor and buy this book right away.* Even if you’re not going to use the API, Pentaho Reporting principles and concepts are explained in great detail.

Many thanks to Packt publishing for sending me the book to review and congratulations to Will Gorman and the reviewers for an excellent job.* Congratulations to Thomas and his community too for making Pentaho Reporting 3.5 a smash hit.

Until next time,
Matt

P.S. I’ll be obviously covering more of this Java API sample at the upcoming Devoxx conference in Antwerp.



More from Matt Casters on Data Integration (Pentaho) Blog...
Latest News Headlines is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Book review: The profit impact of Business Intelligence Latest News Headlines Architecture News Feeds 0 25th November 2009 09:32 AM
Comment on Book review: The profit impact of Business Intelligence by BI is the same, Latest News Headlines Architecture News Feeds 0 25th November 2009 09:32 AM
Book Review - Analysis Services 2008 Unleashed Darren Gosbell Random Procrastination 0 5th October 2009 04:22 AM
Junior Java/J2EE/Spring Consultant - ECM/CMS admin 2009 Job Archive 0 24th September 2009 10:53 PM
Quick book review: Data Mining with SQL Server 2005 James Beresford BI Monkey 0 23rd June 2009 08:34 PM


All times are GMT +11. The time now is 06:06 PM.

© The Business Intelligence Group

Search Engine Optimization by vBSEO