Featured Post

Applying Email Validation to a JavaFX TextField Using Binding

This example uses the same controller as in a previous post but adds a use case to support email validation.  A Commons Validator object is ...

Wednesday, May 18, 2011

Calling a Jasper Report from Talend Open Studio

Use the tJasperOutput component to run a Jasper Report from Talend Open Studio.  This component allows a report to be produced after a data flow is executed.

At the end of processing a data set -- say loading source data into an RDBMS -- you may want to publish static HTML, text, or PDF reports (or all).  This establishes a dependency between the two activities; nothing is published if a loading component failed.  The report publishing subjobs could then be followed with a tFTP put.

To execute a Jasper Report from Talend Open Studio, add a tJasperOutput component to the canvas.  Use a flow to invoke the component.  This example uses a single-row tRowGenerator.

Simple Jasper Report Creation from TOS
Configure the tJasperOutput by specifying the JRXML file, the output file name, and the report type (PDF, HTML, etc.).  Also, make sure that there is a valid iReport command.  Add the file path to the ireport executable.  Test this with the "Launch" button.

Configuring tJasperOutput
This post used the following simple (no datasource) example Jasper Report.  All of the bands except for Title are removed.  Title contains a single Static Text "Hello, World!".  An Empty Datasource is specified in the toolbar.

Simple iReport Designer (Empty Datasource)
And the result is a PDF in the output folder
PDF Result
When starting with tJasperOutput, try using a simple Jasper Report based on a string constant.  This post is a good test to verify that TOS and iReport can communicate.  Future posts will deal with datasources and parameters.

No comments:

Post a Comment