Community Server

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 1 November 2012

Pentaho Report Designer: How to configure error logging

Posted on 12:13 by Unknown

Configure logging

By default PRD outputs the log to the console and to a file.
The log output file can be found in (Linux):
~/.pentaho/logs/prd.log

To configure the log settings amend the log4j.xml file in the PRD/resources folder. See here for more details.

To get a more detailed logging, change this section
 <root>
    <priority value="INFO"/>
    <appender-ref ref="CONSOLE"/>
    <appender-ref ref="FILE"/>
 </root>
to
 <root>
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE"/>
    <appender-ref ref="FILE"/>
 </root>

Here are all possible values listed (see here for more details):
ALL
TRACE
DEBUG
FATAL
ERROR
INFO
OFF

To follow the log simply run (Usually this is not necessary as on Linux you have the terminal window open from which you started PRD, so the log will be display there):
tail -f ~/.pentaho/logs/prd.log

If you want to adjust the location where the log file is stored simple change following section:
<param name="file" value="${user.home}/.pentaho/logs/prd.log"/>
Read More
Posted in Pentaho Report Designer | No comments

Wednesday, 31 October 2012

Experimenting with new layout features in PRD

Posted on 13:09 by Unknown

Experimenting with new layout features in PRD

Note: This article will cover features that are still in development. We take a first look at them, do not expect them to be feature complete and do not use them in production.

All layouting strategies mentioned in this blog post are available for download here.

To experiment with the new features yourself, download the latest PRD build from http://ci.pentaho.com/

Place data rows next to each other

The standard detail layout places one row below the other:

A new feature allows us to actually place each row next to each other:

Our sample dataset:


We set up Region as a group. Our report looks like this:


The report preview looks like this:
Compare the preview with the dataset above: You will see that a new details row was created for each group, and that the data rows were placed next to each other.
You can implement this the following way:


Simply select the Details Body in the Structure tab and in the Style tab set layout to row:

Make the group header part of the details section

And here is how the preview of the report looks:

And here is how you can implement this layout:


Set the layout type as shown above for each band. Here an example for the Group:
Note: Currently you cannot set the elements within the group header to 100%, but it will be possible in future. I implemented a workaround by using a formula to dynamically increase the size of the header element to whatever height the details band and header are consuming.

Table Layout

Although the table layout has been available in the trunk version of PRD for some time (see Thomas’ original blog post), there has hardly anything been written about it.

The table layout available currently is mainly aimed at driving the crosstabs - nevertheless we can have a look at experimenting a bit with it. There is also no wizard or easy GUI available for to create a table [but there is one for crosstabs], so it is not that straightforward to create a table. Also it helps, if you are familiar with the HTML table layout.

Note also, that although you can create tables via the GUI, it is currently not possible to adjust the column widths individually. You can give the first column a specific width and all the other columns will automatically have the same width applied.

As you see, it is a start of having something similar to a table available within PRD. Current efforts of the PRD development team are mainly focused on finishing the cross tabs functionality and any table specific features will have to come after this. This doesn’t stop you though from submitting requests to jira.pentaho.org.

So now lets have a look how a table can be possibly created (info kindly provided by Thomas):

table-header, table-body and table-footer are all variations of a table-body. You will also need table-rows and table-cells to make it work properly.

I would do it in the following way:
group: table
group-header: table-header
 + subband for table-row
    (child elements will be automatically wrapped into a table-cell)
details-body: table-body
   itemband: table-row
group-footer: table-body

(table-footer is not implemented. But if it were, then the table requires it to follow directly after the table-header. See HTML standard for reference.)

I managed to get it working the following way:


I added the extra band element with a table-cell layout to get this working, which normally should not be necessary - this a known bug.

The report looks like this in preview:



I hope you enjoyed seeing some new layouting features of PRD in action. Although they are not ready yet for production, it at least gives you some new ideas what you will be able to do in future.
Read More
Posted in Pentaho Report Designer, PRD, Report Layout | No comments

Tuesday, 30 October 2012

Jasper Report: Gracefully Hide Columns On Request

Posted on 13:20 by Unknown
For some reports you might want to offer the end users some more flexibility in terms of which columns they actually want to see in the report.
Documentation about this feature is scarce. When I was looking at a solution for this request some time ago I coincidentally stumble across Nestor's blog post (Some years ago, when I was living in Miami, Nestor and I used to work for the same company), which I found very useful.

Our requirement is that when a column is hidden it must not consume any space, meaning all columns to the right of it move gracefully to the left. This can be achieved using the table component. 
Our initial report looks something like this:


Define a parameter (i.e. SHOW_CONTINENT) and set its type to Boolean. 
Set the default value to:


new Boolean(true) 

and tick Use as a prompt.

Note: This parameter does not have to be passed to the subdata set!

Screenshot: iReport - Parameter Properties
Screenshot: JasperStudio - Parameter Properties
In the table mark the header column element for the column which you want to hide on request. It is best to select this from the Document Inspector - make sure it is the column and not the element within the cell: 
Note: It does not really matter on which level (table header, column header, detail etc) you select the column.

In the Properties set the Column Print When condition to:

new Boolean($P{PARAMETERNAME})

Screenshot: iReport - Column Properties
Screenshot: JasperStudio - Column Properties
Let's now preview the report. When asked if we want the continent column displayed, we say yes:
Now let's preview the report with the continent column disabled:
As you can see from the screenshot the continent column is not shown and the country, city and sales columns all nicely moved to the left.

Read More
Posted in iReport, JasperReports, JasperSoft, JasperStudio | No comments

Thursday, 25 October 2012

Jasper Report Bursting with Pentaho Data Integration (Kettle) using a REST service

Posted on 02:07 by Unknown

Jasper Report Bursting with Pentaho Data Integration (Kettle) using a REST service

JasperReports Server 4.7 comes with some very useful REST services, one of them being a report creation service. The nice thing about this is that it is extremely easy to call this service.

Imagine our company has several regions and each regional managing director should receive a customized report. As the layout is the same for every region, we can just create one report that we parameterize so that we can display the data that is relevant for each region.

We have the contact details stored in a central database. As other projects already make use of Pentaho Kettle for data integration purposes, we decide to use it as well for our project. The outline of our report bursting process is as shown below:

So we first get all the contact details and then execute the report generation process for each one of these contacts.

As we want the whole process to be easily configurable we add these variables:

The transformation for retrieving the contact details is quite straightforward: Get the data from the database table, check if the email address is valid and copy rows to results:
Let's have a look now at the report generation process, where things get more interesting: 
So we set all the variables (the values are the contact details), we set the variable for the temp directory, then we create the report folder inside the temp directory if it doesn't exist already, after this we delete any files that could be in this report directory already. 

Now comes the important part: We use the HTTP job entry to call the JasperReports Server REST service.

In the General settings of this job entry we provide following URL details:

${VAR_JRS_URL}/rest_v2/reports/${VAR_JRS_DIR}/${VAR_REPORT_NAME}.${VAR_REPORT_OUTPUT_FORMAT_EXTENSION}?j_username=${VAR_JRS_USERNAME}&j_password=${VAR_JRS_PASSWORD}&CUSTOMER_ID=${VAR_CUSTOMER_ID}

As you can see this URL gets dynamically created by using some of the variables we set in the main job and also one report parameter value we retrieved from the contact details (VAR_CUSTOMER_ID). There are various output formats available for the report, in this example we use pdf, but it could also be xls, html etc.

The webserver reply should be stored in the target file (in example):
${VAR_TEMP_DIR}${VAR_REPORT_DIR}/${VAR_REPORT_NAME}-${VAR_CUSTOMER_ID}.${VAR_REPORT_OUTPUT_FORMAT_EXTENSION}

As there might be cases where for a certain parameter value there is no report data and hence no report created, we want to next check if there was actually a report created. If there is no report available, we just end this job gracefully, otherwise we execute the transformation which sends out the email:


In this transformation we get following variable values and assign them to fields:

The path to the report is dynamically created by using this Java expression:
TEMP_DIR + REPORT_DIR + "/" + REPORT_NAME +"-"+ CUSTOMER_ID + "." + REPORT_OUTPUT_FORMAT_EXTENSION

Finally the email settings are defined and the email is sent out with the report as attachment.

Most work in this process is dedicated to creating the report bursting functionality, accessing the JasperReports REST service is actually the easy part. The big advantage of this approach is also that you do not need a dedicated plugin to execute the Jasper report on the server and get the result back.



Read More
Posted in JasperReports, Pentaho Data Integration, Pentaho Kettle, REST | No comments

Tuesday, 7 August 2012

D3JS: A new area of dashboarding

Posted on 11:06 by Unknown
D3JS: A new area of dashboarding

Is this the start of a new era for dashboard generation?

What has been happening so far:
Business intelligence software providers: each of them have their own dashboard implementation - if you are lucky, they make use of open standards. Some of these dashboards look quite dated nowadays, they are very restricted in what can be achieved. And there are also some new cool kids on the block which offer fancy visualisation.

If you created your dashboard from scratch using one of the open standards, you would have probably still reached for dedicated charting libraries.

Now working with charting libraries is in the beginning usually quite easy. You define all the attributes and throw the data at it and it will nicely render what you asked for. You get what you want in quite a short amount of time. But then, what happens if you want to move beyond these ‘out-of-the-box’ functionality? Customization is usually the tricky bit.

Now somebody out there had a quite clever idea: Why not get rid of all the restrictions. Let’s start something from scratch which is based on open standards (HTML5), does not use any charting libraries at all and allows you to create everything you ever envisioned. Sounds too good to be true?

Take a piece of paper. Take a pen. Draw something. You can draw anything. Right?
Write some SVG (Scalable Vector Graphic) “code” (or use Inkscape). You can draw anything. Right? [And imagine you can also animate all of this as well]

What’s the limit?

Now if we could only have data drive these drawings (and HTML tags).

You are lucky: You have a new best friend: Data Driven Documents, short D3 (or D3js).

Data Driven Documents:

Provides an API which allows you to dynamically manipulate the DOM structure of your HTML file. This includes any standard HTML (for example a table) as well as SVG. D3 also provides functions to easily create complex SVG elements (paths for pie charts in example). This is just some of it, there’s more covered in their API reference.

Over the last few weeks I went through several examples and tutorials which are available online and I am deeply impressed! Based on these examples I put together a dashboard with a pie, bar and line chart and an HTML table. The end user can click on a piece of the pie chart and the bar and line charts will be updated respectively. The min and max dots of the bar charts will be highlighted automatically. There is also some animation included. It’s a simple demo to illustrate the potential.  My code could be improved further, but I am running out of time:

Click here to see the simple dashboard in action (Modern Web Browsers required)

Charts as well standard text and table elements can be styled centrally by using CSS. In the past, having worked with various dashboard and report technologies, I always disliked it when I had to define global styles for charts separately - and in most of the cases this feature wasn’t even available. Now, D3js and HTML5 make this finally possible! The setup is extremely simple, your only dependency on the server side is the D3js library and on the client side a modern web browser. You can use standard web development tools to create your dashboard. These are just a few of the advantages.

Resources

I strongly recommend checking out the example code and tutorials which are available online, in example on the D3js site. Scott Murray’s tutorial is one of the best tutorials I have come across in recent times. Jump in and enjoy the advantages of D3js!
Read More
Posted in D3JS, Dashboarding, HTML5, SVG | No comments

Tuesday, 5 June 2012

Free Book: Talend Master Data Management Practical Starter Guide

Posted on 08:11 by Unknown
Master Data Management has gained a strong momentum in the last few years. I spent the last few months putting together a small practical book on Talend Open Studio for Master Data Management. This book should give people unfamiliar with the topic and the tool an easy starting point as it walks you through several hands-on tutorials. The book available online here (for free).
If you do find any errors, please let me know here by posting a comment and I will update the document as soon as possible.
Read More
Posted in | No comments

Tuesday, 17 April 2012

Creating and using external Jasper Report styles with JasperWave

Posted on 12:04 by Unknown

Creating and using external Jasper Report styles with JasperWave

The JasperWave team just released version 0.9.5 of their JasperReports Designer. Among the main new features are External Style Templates, JavaBean data source and custom Java classes.

Having worked in the past a lot with external styles I can tell a story or two about how challenging it sometimes was to go down this route. The “challenging” bit only refers to actually using external and internal styles with the designer GUI.
It is needless to say that using external style sheets is the most effective way to go in large scale projects. Creating these external style sheets is fairly easy, but the problem arises when your report designer GUI does not offer a nice integration. The JasperWave team identified this as a shortcoming in current designers and hence had their own take at implementing this feature. Now let’s have a look if they succeeded in their goal:

Download the latest version of the JasperWave report designer from here. You have the option to use a standalone client (this is the easiest setup) or to use the Eclipse plugin. If you go down the Eclipse route, make sure that you first install GEF (as highlighted on the downloads page).

Once installed successfully, fire up JasperWave Report Designer. In case you are using the standalone version, you will find the Browser in the bottom left hand corner. Navigate to a convenient folder to store our report. Right click on this folder and choose New Report:

Specify a filename and click on Finish. Your screen should now look like this:
Now let’s create two new external style sheets for the purpose of this tutorial. Click on the Plus button in the Style Templates area in the Properties panel (right hand side):

In quotation marks write table_external_styles.jrtx:
Click OK.
In the same fashion create another external stylesheet called title_external_styles.jrtx. Remember to enclose this in quotation marks!

Time to save our report! Click on the Save button (or alternatively depending on OS CTRL+S or CMD+S)

In the Browser right click on your folder and choose Refresh. The folder content should now look like this:

As you can see, JasperWave created the external style sheets for us.

Now it is time to introduce you to our new best friend, the Styles Manager. This is the one place where you can manage all your styles, be it external or internal styles, one or many external style sheets. This is extremely convenient, as it means you don’t have to wade through many different files to get an overview of your styles.
You can access the styles manager either by clicking on the style button in the top tool bar or if you click on a report element (like a Text Field) you can find the style button next to each property in the properties panel. The latter enables a very convenient access to a specific style.

So let’s create some styles:
  1. Click on the Style button in the top tool bar:
  2. In the Styles Manager, click on New Style:
  3. Name the style report_title
  4. Next we can define where we want the new style to be stored. In the Location pull down menu choose the external style sheet we created earlier on: title_external_styles.jrtx. Note: Embedded means that the style will be stored within the report file (internal style).
  5. Set a few properties for this style like Font, Font size, Bold etc. Note how the greyed out circular arrow button turns blue once you set the style. This is a very good indicator as you can easily spot which styles have been set and which ones not! If you ever want to set the Default value for a particular style, just click this button!
    Also watch the
    Style preview as you add properties!
  6. Next create a new style called table_header_string. Set the Location to table_external_styles and set a few properties for this style like Font, Font size, Bold etc.
  7. Finally create an internal style called custom_subtitle. Set the Location to Embedded and set a few properties for this style like Font, Font size, Bold etc.
  8. If you take a look now at the styles listing, you will see that each style is suffixed by its location in case of an external style:

Now let’s quickly have a look on how to use these styles. Add 2 static text elements to the report title section and one static text element to the column header. Populate them with some text.

Mark the first static text element and expand the Style section in the properties panel. Choose report_title:

Assign the custom_subtitle style to the next static text element and finally the table_header_string style to the last static text element. Your report should now look something like this:
As you can see, the styles are instantly applied in the report design area.

Now we realize that we actually want the table heading to have a different foreground color. I show you now another way to access the Styles Manager: Mark the table header static text element and click on the Style button in the Style properties section:

You will see that in the Styles Manager this style is automatically selected. Change now the foreground color to green.

In the course of this short tutorial you learnt how easy it is with JasperWave to use external as well as internal styles. I have to say that this implementation of styles in a Jasper Reports Designer is the best I have seen so far! I do sincerely hope that this project gets the community support it deserves! You can find a more detailed documentation on using styles with Jasperwave on their website.
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Pentaho Kettle Parameters and Variables: Tips and Tricks
    Pentaho Kettle Parameters and Variables: Tips and Tricks This blog post is not intended to be a formal introduction to using parameters and ...
  • Using Parameters in Pentaho Report Designer
    Using Parameters in Pentaho Report Designer Introduction How to define a parameter Additional info about the new parameter dialog Hidden Par...
  • Pentaho Data Integration: Scheduling and command line arguments
    Pentaho Data Integration (Kettle): Command line arguments and scheduling Tutorial Details Software: PDI/Kettle 4.1 (download here ), MySQL S...
  • Jaspersoft iReport: How to pass a parameter to a sub-dataset
    Jaspersoft iReport: How to pass a parameter to a sub-dataset Let’s say our main report is grouped by continent and the details band holds sa...
  • Pentaho Data Integration and Infinidb Series: Bulk Upload
    Pentaho Data Integration and InfiniDB Series: Bulk Upload Introduction Prepare Tables Using mainly Kettle steps Check if file exists Setup I...
  • Using regular expressions with Pentah...
    Using regular expressions with Pentaho Data Integration (Kettle) There are quite some transformations steps that allow you to work with regu...
  • Pentaho Data Integration: Remote execution with Carte
    Pentaho Data Integration: Remote execution with Carte Tutorial Details Software: PDI/Kettle 4.1 (download  here ), installed on your PC and ...
  • How to create a loop in Pentaho Kettle
    I finished my first ever video tutorial! This video will demonstrate you how easy it is to create a loop in Pentaho Kettle. Enjoy!
  • How to Set Up Pentaho Community Build Framework
    How to Set Up Pentaho Community Build Framework  Introduction Pentaho BI Server Setup with CBF Java, Tomcat and Ant Set environment variable...
  • Metadata Driven ETL and Reporting
    Metadata Driven ETL and Reporting with Pentaho Data Integration and Report Designer Tutorial Details  Software : If PDI Kettle 4.2 GA and PR...

Categories

  • "Bulk Loader"
  • "Bulk Loading"
  • "Hadoop"
  • "Kettle"
  • "Pentaho Book"
  • "Pentaho Data Integration"
  • "Pentaho Kettle"
  • "Pentaho Report Designer MDX MQL JDBC Parameters How To"
  • "Pentaho Report Designer MDX Parameters"
  • "Pentaho Report Designer MQL Parameters"
  • "Pentaho Report Designer Parmaters"
  • "Pentaho Report Designer"
  • "Pentaho Reporting 3.5 for Java Developers"
  • "Pentaho Reporting Book"
  • "Routing"
  • "Schema Workbench"
  • "Testing"
  • "Unicode"
  • "Unit testing"
  • "UTF8"
  • Agile development
  • automated testing
  • Big Data
  • Book Review
  • C-Tools
  • CBF
  • Clustered transformation
  • Command Line Arguments
  • Community Build Framework
  • D3JS
  • Dashboarding
  • Data Integration
  • Data Warehouse
  • Database Change Management
  • Database Version Control
  • Date Dimension
  • DBFit
  • ETL
  • ETLFit
  • Federated database
  • Google Charts
  • Google Visualization API
  • Hadoop
  • HTML5
  • iReport
  • JasperReports
  • JasperSoft
  • JasperStudio
  • Kettle
  • Kimball
  • Loop
  • Master data management
  • Metadata
  • Metedata editor
  • Mondrian
  • multidimensional modeling
  • OLAP
  • Open Source
  • Parameter
  • Parameters
  • Pentaho
  • Pentaho BI Server
  • Pentaho Data Integration
  • Pentaho Data Integration 4 Cookbook
  • Pentaho Kettle
  • Pentaho Metadata Editor Tutorial
  • Pentaho Report Designer
  • PostgreSQL
  • PRD
  • Report Layout
  • REST
  • Routing
  • Saiku
  • Scheduling
  • Slowly Changing Dimension
  • Sqitch
  • SVG
  • Talend
  • Talend MDM
  • Talend Open Studio
  • Tutorial
  • Variable
  • Web service
  • Xactions

Blog Archive

  • ▼  2013 (24)
    • ▼  December (2)
      • Pentaho 5.0 Reporting by Example: Beginner’s Guide...
      • Going Agile: Test your Pentaho ETL transformations...
    • ►  November (3)
    • ►  October (2)
    • ►  September (1)
    • ►  August (3)
    • ►  July (2)
    • ►  June (1)
    • ►  May (2)
    • ►  April (1)
    • ►  March (3)
    • ►  February (1)
    • ►  January (3)
  • ►  2012 (20)
    • ►  November (3)
    • ►  October (3)
    • ►  August (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (5)
    • ►  January (3)
  • ►  2011 (19)
    • ►  November (3)
    • ►  July (2)
    • ►  June (1)
    • ►  May (4)
    • ►  April (2)
    • ►  March (1)
    • ►  February (3)
    • ►  January (3)
  • ►  2010 (17)
    • ►  December (1)
    • ►  November (6)
    • ►  September (1)
    • ►  August (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
    • ►  January (1)
  • ►  2009 (18)
    • ►  December (3)
    • ►  November (1)
    • ►  October (5)
    • ►  September (7)
    • ►  July (2)
Powered by Blogger.

About Me

Unknown
View my complete profile