<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8309597261528663292</id><updated>2012-02-04T13:29:20.295-08:00</updated><category term='pentaho osbi cbf pmalves'/><category term='pentaho osbi cdf dashboard'/><category term='pentaho prd prd3.5 osbi scripting javascript tooltip'/><category term='pentaho birt eclipse plugin'/><category term='pentaho pme'/><category term='pentaho prd prd3.5 osbi sparklines visualization'/><category term='pentaho pdi kettle BIRT bursting'/><category term='pentaho prd prd3.5 crosstab pivot'/><category term='Pentaho PRD functions ADD_MONTHS QUARTER'/><category term='pentaho pdi kettle m2p'/><title type='text'>(OS)BI</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-7357486273434897309</id><published>2011-08-25T07:07:00.000-07:00</published><updated>2011-10-03T05:55:17.916-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho pdi kettle BIRT bursting'/><title type='text'>Pentaho Kettle - BIRT Output Step</title><content type='html'>Matt &lt;a href="http://www.ibridge.be/?p=190"&gt;announced&lt;/a&gt; the Pentaho Reporting output step for Kettle almost a year ago. This step allows Kettle to be used to generate and burst reports, which makes it much more than a pure ETL and data integration tool.&lt;br /&gt;With the possibility to run Eclipse BIRT reports from within the Pentaho User Console, I thought it would be a shame not the have the possibility to generate and burst BIRT reports, and developed a similar output step for BIRT reports. Just &lt;a href="https://docs.google.com/leaf?id=0B8t6VUps1RVFZjYzZDg3YjMtODM0ZS00MjdlLThiYmYtZDk4YjE0NzlmMjEw&amp;amp;hl=en_US"&gt;download&lt;/a&gt;, unzip into your Kettle installation folder and (re-)start Spoon.&lt;br /&gt;&lt;br /&gt;This step contains the 2.6.2 runtime, but that should be relatively easy to change. A version that supports BIRT 3.7 should arrive in the more or less near future.&lt;br /&gt;The code for this step will be released in the next couple of days. In the meantime, do not hesitate to give me your feedback.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-E-xNgOAXzCY/TlZW95pwDTI/AAAAAAAAAag/79OVnwoQSKQ/s1600/Selection_004.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="330" src="http://3.bp.blogspot.com/-E-xNgOAXzCY/TlZW95pwDTI/AAAAAAAAAag/79OVnwoQSKQ/s640/Selection_004.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE (06-Sep-2011)&lt;/b&gt;: there was a small bug in the parameter handling, should be ok now (thanks Sylvain @osbi_fr for noticing and testing). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-7357486273434897309?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/7357486273434897309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=7357486273434897309' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/7357486273434897309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/7357486273434897309'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2011/08/pentaho-kettle-birt-output-step.html' title='Pentaho Kettle - BIRT Output Step'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-E-xNgOAXzCY/TlZW95pwDTI/AAAAAAAAAag/79OVnwoQSKQ/s72-c/Selection_004.png' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-2421698428781380076</id><published>2011-08-22T07:40:00.000-07:00</published><updated>2011-08-22T09:31:43.859-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho birt eclipse plugin'/><title type='text'>Running Fully Functional Eclipse BIRT Reports in Pentaho - UPDATE</title><content type='html'>When I wrote my &lt;a href="http://b-e-o.blogspot.com/2010/09/running-fully-functional-eclipse-birt.html"&gt;post&lt;/a&gt; about integrating the Eclipse BIRT report viewer in Pentaho almost a year ago, Pentaho was at release 3.6. Since then, 3.7 and 3.8 have been released, and 3.9/4.0 is about to go GA. The biserver's plugin architecture has seen some changes over these releases, causing the BIRT plugin to break.&lt;br /&gt;A new &lt;a href="https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B8t6VUps1RVFMmY1ZmY2MTItODJlOS00ZGFiLTgxN2ItOTcwMWFmMWRhZjM3&amp;amp;hl=en_US"&gt;plugin&lt;/a&gt; is now available, compatible with Pentaho &amp;gt;= 3.6 and BIRT releases 2.6.x and 3.7. The installation instructions remain unchanged, check my &lt;a href="http://b-e-o.blogspot.com/2010/09/running-fully-functional-eclipse-birt.html"&gt;original post&lt;/a&gt; for reference.  &lt;br /&gt;BIRT switched to a jar-based runtime with version 3.7. The default runtime jar, however, does not include the OpenDocument emitters that were also introduced in 3.7. If you want to offer your users the possiblity to export reports to ODF-formats, you’ll need to add some jars to the runtime webapp.&amp;nbsp;All this takes is to copy the necessary jars from the full Eclipse BIRT (designer) download (&amp;lt;ECLIPSE&amp;gt;/plugins/org.eclipse.birt.report.engine.emitter.od*.jar and org.eclipse.birt.report.engine.odf_3.7.0.v20110609.jar, timestamps in file names may vary slightly) to &amp;lt;PENTAHO&amp;gt;/biserver-ce/tomcat/webapps/WebViewerExample/WEB-INF/lib/. Recent BIRT versions also need a commons-logging jar in the classpath. You can copy this file from the &amp;lt;PENTAHO&amp;gt;/tomcat/webapps/pentaho/WEB-INF/lib to &amp;lt;PENTAHO&amp;gt;/tomcat/lib or to &amp;lt;PENTAHO&amp;gt;/tomcat/webapps/WebViewerExample/WEB-INF/lib.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-rEyqrbIHFWg/TlJiMQGN3xI/AAAAAAAAAaY/WAVJAVFmiag/s1600/Selection_002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="409" src="http://2.bp.blogspot.com/-rEyqrbIHFWg/TlJiMQGN3xI/AAAAAAAAAaY/WAVJAVFmiag/s640/Selection_002.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In addition to the original post: you can apply security to your BIRT reports by adding the BIRT report file extension (.rptdesign) to the ‘acl-files’ element in &lt;pentaho&gt;/pentaho-solutions/system/pentaho.xml, so it looks something like the element below:&lt;br /&gt;&lt;/pentaho&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;acl-files&gt;xaction,url,prpt,xdash,xcdf,rptdesign&lt;/acl-files&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This plugin is very simple. All it does is tell the biserver to recognice the .rptdesign file extension, and point it to the BIRT report viewer for execution. As simple as it is, I will release the code for this plugin in a couple of days. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-2421698428781380076?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/2421698428781380076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=2421698428781380076' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/2421698428781380076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/2421698428781380076'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2011/08/running-fully-functional-eclipse-birt.html' title='Running Fully Functional Eclipse BIRT Reports in Pentaho - UPDATE'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-rEyqrbIHFWg/TlJiMQGN3xI/AAAAAAAAAaY/WAVJAVFmiag/s72-c/Selection_002.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-3341563178676431041</id><published>2011-07-29T13:20:00.000-07:00</published><updated>2011-08-04T06:20:26.422-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho pdi kettle m2p'/><title type='text'>M2P - Move To Production for Kettle</title><content type='html'>&lt;h2&gt;Introduction&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Just like with any other software projects, serious ETL projects work in at least two, preferably three stages: development, acceptance and production. There may even be a fourth, testing environment between development and acceptance. You don’t want to introduce human errors in moving your content from one environment to the other, so it is important to add as much automation to this process as possible.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;M2P&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Move To Production (M2P) is a framework (to be released shortly) that aims to make the process of moving your Kettle jobs and transformations as automated and robust as possible.&lt;br /&gt;Kettle comes with a flexible repository export job entry that allows to export your repository to a .xml file. With version 4.2-RC1, a command line utility -import.sh- allows you to import that .xml file into another repository. The combination of these two tools allow you to move your ETL content between environments, but it still takes some effort to perform this automatically. This is where this framework comes in.&lt;br /&gt;The framework consists of a job, a couple of transformations and a Linux shell script. Adding support for Windows and/or Mac OS wouldn’t be hard (Mac OS may work right out of the box, but this is untested), but all of the projects I work on are on Linux, so there has not been any need to add that.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-OTtwxZdTyWo/TjMTAhbTx_I/AAAAAAAAAaE/qUAYe4hmMHk/s1600/Selection_007.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="177" src="http://3.bp.blogspot.com/-OTtwxZdTyWo/TjMTAhbTx_I/AAAAAAAAAaE/qUAYe4hmMHk/s640/Selection_007.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The first transformation ‘Parse Parameters’ quite surprisingly parses the parameters:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;u&gt;COMMENT&lt;/u&gt;:        The comment that will be set for the new revisions of the transformations and jobs caused by the import. &lt;b&gt;OPTIONAL&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;u&gt;DIRECTION&lt;/u&gt;:    ACC2PRD    The direction of the migration. Possible values are DEV2ACC and ACC2PRD. &lt;b&gt;REQUIRED&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;u&gt;RULES_FILE&lt;/u&gt;: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The path to the rules file that you want to use during the import. Defaults to an empty rules file &lt;m2p-home&gt;/rules.xml. &lt;b&gt;OPTIONAL&lt;/b&gt;&lt;/m2p-home&gt;&lt;/li&gt;&lt;li&gt;&lt;u&gt;SRCFOLDER&lt;/u&gt;: &amp;nbsp; &amp;nbsp;/    The folder that needs to be exported from the source repository. Defaults to /. &lt;b&gt;OPTIONAL&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;u&gt;TMP_FOLDER&lt;/u&gt;: &amp;nbsp; &amp;nbsp;/tmp/m2p    A folder where the export will be stored intermediately. If not used, a temporary folder will be created in the executing user’s home. &lt;b&gt;OPTIONAL&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;u&gt;TRGFOLDER&lt;/u&gt;: &amp;nbsp; &amp;nbsp;/    The folder in the target repository that the export needs to be imported in. Defaults to /. &lt;b&gt;OPTIONAL&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;The second transformation ‘Parse Repositories’ reads a simple m2p.xml file in the M2P home folder. This xml file specifies the development, acceptance and production folders. The repositories in this file use repositories.xml in your&amp;nbsp;&lt;home&gt;/.kettle/repositories.xml file to connect to and export/import from, and set variables to decide the source and target repositories.&amp;nbsp;&lt;/home&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;home&gt;&lt;br /&gt;&lt;/home&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-trjoWhXjOKs/TjMUVfm8JmI/AAAAAAAAAaI/_AWuRGVvuuM/s1600/Selection_012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="355" src="http://4.bp.blogspot.com/-trjoWhXjOKs/TjMUVfm8JmI/AAAAAAAAAaI/_AWuRGVvuuM/s400/Selection_012.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;This is all the information we need to export from the source repository:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-M5gVjx4O5fI/TjMUqa-bb6I/AAAAAAAAAaM/sjU8BPoKrNY/s1600/Export+repository...+_008.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="616" src="http://3.bp.blogspot.com/-M5gVjx4O5fI/TjMUqa-bb6I/AAAAAAAAAaM/sjU8BPoKrNY/s640/Export+repository...+_008.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Once the repository export has been done, we are ready to pass the necessary parameters to the shell script to import into the desired folder in the target repository.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IM6F3I8SBus/TjMU6Q3GzkI/AAAAAAAAAaQ/Kx5Nq_vQow4/s1600/Execute+a+shell+script+...+_010.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="518" src="http://3.bp.blogspot.com/-IM6F3I8SBus/TjMU6Q3GzkI/AAAAAAAAAaQ/Kx5Nq_vQow4/s640/Execute+a+shell+script+...+_010.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;m2p-home&gt;&lt;home&gt;&lt;br /&gt;&lt;br /&gt;As can be seen from the shell script job entry, this shell script takes seven parameters:&lt;br /&gt;&lt;/home&gt;&lt;/m2p-home&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the PDI working dir. We need to move to this directory to execute kitchen.sh.&lt;/li&gt;&lt;li&gt;the name of the target repository&lt;/li&gt;&lt;li&gt;the user name to connect to the target repository&lt;/li&gt;&lt;li&gt;the password to connect to the target repository&lt;/li&gt;&lt;li&gt;the folder to import into the target repository&lt;/li&gt;&lt;li&gt;the folder to read the exported repository file from&lt;/li&gt;&lt;li&gt;a comment to add to the newly created job and transformation versions for Enterprise Repositories.&lt;/li&gt;&lt;li&gt;the rules file you want to use for the import.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;As you are moving between environments, it is assumed you have good reasons to replace existing jobs and transformations, either to add functionality or to fix bugs, therefore, ‘replace=true’ is hard coded in the script.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Moving content between environments&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;With all this information in place, the main job can be executed either through Spoon or -ideally- through Kitchen. After execution of the job, your new set of jobs and transformations will be in place in the target repository. Use the repository explorer to check, you will find a new version and comment if you are using an Enterprise Repository.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-7B8M9lwep5s/TjMVPHHPCWI/AAAAAAAAAaU/cfERx_Dw8VU/s1600/Selection_011.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://3.bp.blogspot.com/-7B8M9lwep5s/TjMVPHHPCWI/AAAAAAAAAaU/cfERx_Dw8VU/s640/Selection_011.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;This framework aims to help you in the process of moving your jobs between environments. The software that allows you to do this is in it's RC stage, so there’s still a lot to add to this framework. More options will be added as soon as possible, but this has already proven to be of great help to avoid human errors in the move to production process.&lt;br /&gt;This framework was developed because it was needed in projects I am working on, but will be released as a an open source project shortly. Feedback and tips to improve it or to add new functionality are -as always- very welcome. &lt;/div&gt;&lt;br /&gt;&lt;b&gt;Update&lt;/b&gt;: M2P is now available on &lt;a href="https://github.com/bamaer/m2p"&gt;github&lt;/a&gt;.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-3341563178676431041?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/3341563178676431041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=3341563178676431041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/3341563178676431041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/3341563178676431041'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2011/07/m2p-move-to-production-for-kettle.html' title='M2P - Move To Production for Kettle'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-OTtwxZdTyWo/TjMTAhbTx_I/AAAAAAAAAaE/qUAYe4hmMHk/s72-c/Selection_007.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-5194568599218817207</id><published>2011-07-27T14:43:00.000-07:00</published><updated>2011-07-27T14:48:14.049-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pentaho PRD functions ADD_MONTHS QUARTER'/><title type='text'>Pentaho Reporting Custom Functions</title><content type='html'>Pentaho’s reporting engine offers an extensive library of functions for use in your reports. Sometimes however, the functions in this library just don’t cut it. This may be because you use some formula all over the place in your reports, because a function you really need isn’t there, or for whatever reason.&lt;br /&gt;At a project I am currently working on, people are in the process of moving their current BI platform to Pentaho, but some of the functions they use extensively in their current reports do not exist in the Pentaho report engine.&lt;br /&gt;This is where LibFormula comes in. The Pentaho reporting engine maintains LibFormula as a side project for these functions. LibFormula was written from the ground up to be extensible, so if you have basic Java knowledge, LibFormula makes it very easy for you to develop your own custom functions.&lt;br /&gt;&lt;br /&gt;This is exactly what was needed for this project, and we started porting those functions of the current platform to LibFormula.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Many more will follow, we have added these functions so far:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;QUARTER(“Date”)&lt;/b&gt;: &amp;nbsp;returns the quarter for a given date.&lt;/li&gt;&lt;li&gt;&lt;b&gt;ADD_MONTHS(“Date”; “Number”)&lt;/b&gt;:&amp;nbsp;returns a new date, created from the first parameter, augmented with the number of months given in the second parameter. If this second parameter is negative, a number of months is subtracted from the first parameter.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-oWjUJtoadeg/TjCFsGNggnI/AAAAAAAAAaA/gAzuv4tTYnE/s1600/Selection_005.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-oWjUJtoadeg/TjCFsGNggnI/AAAAAAAAAaA/gAzuv4tTYnE/s320/Selection_005.png" width="291" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All the technical details about developing custom functions are in the &lt;a href="http://wiki.pentaho.com/display/Reporting/Extending+Libformula+-+Creating+your+own+function"&gt;Wiki&lt;/a&gt;, but the whole process is quite straightforward and proves once more the power and flexibility of open source software over its traditional, closed counterparts.&lt;br /&gt;&lt;br /&gt;To try these functions for yourself, just &lt;a href="https://docs.google.com/leaf?id=0B8t6VUps1RVFZTQ3YjU5MjUtYzIxYS00NjU3LTkzZGUtNDY5YTE1MWM3ODky&amp;amp;hl=en_US"&gt;download&lt;/a&gt; the jar, drop it into &amp;lt;PRD&amp;gt;/lib, restart PRD and have a look at the functions list. Let me know if you run into any issues, or if there is a function your really want to see in this library. This download is binary only for now, but the code will be released in a couple of days.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-5194568599218817207?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/5194568599218817207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=5194568599218817207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/5194568599218817207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/5194568599218817207'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2011/07/pentaho-reporting-custom-functions.html' title='Pentaho Reporting Custom Functions'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-oWjUJtoadeg/TjCFsGNggnI/AAAAAAAAAaA/gAzuv4tTYnE/s72-c/Selection_005.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-4539065609703153203</id><published>2011-07-14T13:21:00.000-07:00</published><updated>2011-07-14T13:29:56.676-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho pme'/><title type='text'>PME Publish: Metadata File Name and Publish Location</title><content type='html'>&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;The  Pentaho Metadata Editor (PME) is theoretically a very powerful piece of  software, but it hasn’t been getting the love it deserves lately. In  fact, the only thing that changed since 2009 is the version number  (yeah, I know there’s ‘IN’-parameter support in 4.0-RC1). &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;One of the things that enerves me most is the publish dialog. &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"&gt;metadata file name&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;:  there is no option to specify a name for your metadata file on the  server. This leads people to believe there can only be one file per  folder, which is not correct. There can be multiple metadata files per  folder, but as PME has ‘metadata.xmi’ hard coded as a file name, every  new publish overwrites the previous file. To work with multiple metadata  files in one folder, you will need to export your model to a .xmi file  and manually move it to your solution folder on the server. This process  needs to be repeated for every single change you make to a file. &lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"&gt;hard coded default solution&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;:  the ‘steel-wheels’ solution is hard coded in PME. You will need to  change this to the solution folder on your server every single time you  publish a model. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Instead of waiting for Pentaho to implement &lt;/span&gt;&lt;a href="http://jira.pentaho.com/browse/PMD-455"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;PMD-455&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;,  I downloaded the code and made some quick modifications to this dialog:  the Metadata File Name and Publish Location fields now store previous  versions in a drop down box and default to the last value used, just  like the publish url.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;img height="355px;" src="https://lh5.googleusercontent.com/7TWLuw8SAyTw1KK0t5v6B1NBLNJgXUpu44EUyuUnrXzxfQMdpsV_lHmUQaqT8FDfNzUUidZZ0ntjIgC8Nihw5QpHMrbWx-oz4bxmJStB5SUCsESUH5A" width="618px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;For me, this makes getting my metadata models on the server a lot easier. Feel free to &lt;/span&gt;&lt;a href="https://docs.google.com/leaf?id=0B8t6VUps1RVFOTc3NTQ1YTQtODIxMy00ZjgzLTg3ZjMtODU4NDdkNjRhNzBl&amp;amp;hl=en_US"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;download&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; your copy of this modified PME (based on trunk code, the modified PublishDialog.java is included) and give it a try.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-4539065609703153203?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/4539065609703153203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=4539065609703153203' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/4539065609703153203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/4539065609703153203'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2011/07/pme-publish-metadata-file-name-and.html' title='PME Publish: Metadata File Name and Publish Location'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-1823352824236526326</id><published>2010-09-13T13:01:00.000-07:00</published><updated>2010-09-13T13:01:32.642-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho birt eclipse plugin'/><title type='text'>Running fully functional Eclipse BIRT reports in Pentaho</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;While exploring Pentaho's &lt;a href="http://wiki.pentaho.com/display/ServerDoc2x/Echo+Plugin+-+a+sample+plugin+for+the+BI+Platform"&gt;echo&lt;/a&gt; plugin a few days ago, I was wondering what it would take to write a plugin that would allow Eclipse BIRT to be used in the Pentaho User Console.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;div style="border-collapse: separate;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;div style="border-collapse: separate; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;While the Pentaho report engine has made some huge leaps in the last couple of years, there are still areas where it is outclassed by BIRT. Apart from pure functionality, Eclipse BIRT is a very (&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://blogs.forrester.com/boris_evelson/10-08-10-results_forrester_wave%E2%84%A2_open_source_business_intelligence_bi_q3_2010"&gt;arguably the most&lt;/a&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;) popular open source BI project.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;Pentaho has supported BIRT since the earliest days of the platform. However, support has never been splendid: functionality is&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://forums.pentaho.com/showthread.php?75732-Pentaho-3.5.2-BIRT-2.5.2"&gt;missing&lt;/a&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;or&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://forums.pentaho.com/showthread.php?72284-BIRT-2.5-charts"&gt;incomplete&lt;/a&gt;, the BIRT engine in Pentaho is still at 2.2.1 (which was released almost four years ago), so people had problems running their reports created with newer version of the BIRT report designer. Last but not least, every single report had to be called in it's own action sequence. This action sequence needed to re-specify the parameters that were already implemented in the report. One had to really want to use BIRT reports in Pentaho quite desperately to go through this mess.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;The BIRT report viewer, the application behind the 'View Report in Web Viewer' option in BIRT's report designer, is also available as a web application in the BIRT runtime&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-2_6_0-201006171315/birt-runtime-2_6_0.zip"&gt;download&lt;/a&gt;. Instead of writing a new plugin from scratch, which would undoubtedly result in the same mess as with the old plugin, I wanted to drag this report viewer into the PUC.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;div style="border-collapse: separate;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;I was quite surprised to see how easily this can be done. Extract the WebViewerExample from the runtime archive to your Pentaho server's webapps folder (&lt;installdir&gt;/biserver-ce/tomcat/webapps/). Next, we need to tell BIRT where to look for reports. Open &lt;installdir&gt;/biserver-ce/tomcat/webapps/WebViewerExample/WEB-INF/web.xml and add your pentaho solutions folder to the BIRT_VIEWER_WORKING_FOLDER parameter.&lt;/installdir&gt;&lt;/installdir&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="mvuk" style="border-collapse: collapse; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;lt;&lt;/span&gt;context-param&amp;gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;   &amp;lt;&lt;/span&gt;param-name&amp;gt;BIRT_VIEWER_WORKING_FOLDER&amp;lt;/param-name&amp;gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;   &amp;lt;&lt;/span&gt;param-value&amp;gt;/opt/pentaho/biserver/ce/3.6.0-BIRT/biserver-ce/pentaho-solutions&amp;lt;/param-value&amp;gt;&lt;br /&gt;&lt;param-value&gt;&amp;lt;/context-param&amp;gt;&lt;/param-value&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="border-collapse: separate;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="border-collapse: separate; clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;You can test if this application was installed and configured correctly by firing up your Pentaho server and going to&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;&lt;a href="http://localhost:8080/WebViewerExample/"&gt;http://localhost:8080/WebViewerExample/&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;. Click 'View Example' in the lower left corner to run a sample report.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="border-collapse: separate; clear: both; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xQMy0Z8I/AAAAAAAAAXA/GXD8a4h0fSU/s1600/Eclipse+BIRT+Home+-+Google+Chrome_006.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xQMy0Z8I/AAAAAAAAAXA/GXD8a4h0fSU/s400/Eclipse+BIRT+Home+-+Google+Chrome_006.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="border-collapse: separate; clear: both; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xWU-LUJI/AAAAAAAAAXI/0wf7FvgbX74/s1600/BIRT+Report+Viewer+-+Google+Chrome_007.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xWU-LUJI/AAAAAAAAAXI/0wf7FvgbX74/s400/BIRT+Report+Viewer+-+Google+Chrome_007.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;Get the&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.bismart.be/birt-plugin.zip"&gt;plugin&lt;/a&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;and unzip it: the 'birt-plugin' folder should go to your pentaho-solutions/system folder, the sample report SalesInvoice.rptdesign should go to pentaho-solutions/steel-wheels/reports. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;All that is left to be done now is make the command-tag in birt-plugin/plugin.xml point to the BIRT web viewer and pass in the correct path, solution and action values:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="mvuk" style="border-collapse: collapse; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;operations&gt;&lt;/operations&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp;&amp;lt;command&amp;gt;http://localhost:8080/WebViewerExample/frameset?__report={solution}/{path}/{name}&amp;lt;/command&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="border-collapse: separate; font-style: normal; font-weight: normal; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; widows: 2;"&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif;"&gt;Start your Pentaho server and verify that you can see and execute the sample BIRT report. If this works, you have a fully functional Eclipse BIRT environment integrated in your Pentaho server.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="border-collapse: separate; clear: both; margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xqgI685I/AAAAAAAAAXY/VZm0gcAvisQ/s1600/Pentaho+User+Console+-+SalesInvoice.rptdesign+-+Google+Chrome_009.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="404" src="http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xqgI685I/AAAAAAAAAXY/VZm0gcAvisQ/s640/Pentaho+User+Console+-+SalesInvoice.rptdesign+-+Google+Chrome_009.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style="border-collapse: separate;"&gt;&lt;/div&gt;&lt;div style="border-collapse: separate;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;br class="Apple-interchange-newline" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-1823352824236526326?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/1823352824236526326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=1823352824236526326' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/1823352824236526326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/1823352824236526326'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2010/09/running-fully-functional-eclipse-birt.html' title='Running fully functional Eclipse BIRT reports in Pentaho'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_lWqRaFGdjws/TI5xQMy0Z8I/AAAAAAAAAXA/GXD8a4h0fSU/s72-c/Eclipse+BIRT+Home+-+Google+Chrome_006.png' height='72' width='72'/><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-1441935580946306370</id><published>2010-02-05T13:26:00.001-08:00</published><updated>2010-02-13T03:07:03.749-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho osbi cbf pmalves'/><title type='text'>Building Pentaho in three steps with CBF</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin: 6px; min-height: 1100px; padding: 0px;"&gt;&lt;div style="margin: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;b&gt;CBF&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;One of the most underestimated projects in the Pentahosphere is the Community Build Framework, CBF for short, an ant build script created by CDF-wizard&amp;nbsp;&lt;a href="http://www.webdetails.pt/" id="p1nm" style="color: #551a8b;" title="Pedro Alves"&gt;Pedro Alves&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Anyone who has worked on several projects and/or Pentaho versions knows it very easily becomes hard to manage all configurations and solutions, not to mention versioning, backups, etc.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;All of this becomes more or less trivial with CBF. The approach used by the CBF has many advantages: all project specific configuration and solution files are kept together, a configuration file tells which Pentaho server version to build and what application server to run it on, and patches are applied to the project files; no original Pentaho sources are modified.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Now, let's have a look at the three steps we need to take to get CBF running on your system. The server we'll be building will be a very basic one, but it will have all you need to get started with CBF and it won't take you any longer than 15 minutes to have it up and running.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;b&gt;Prepare&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Your system needs to have some tools available before you can start building:&amp;nbsp;&lt;/div&gt;&lt;ul style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;java&lt;/u&gt;&lt;/b&gt;: kicking in an open door: you need a java compiler to build your Pentaho server. Issue a 'javac -version' to make sure you are using a (decent) JDK.&amp;nbsp;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;ant&lt;/u&gt;&lt;/b&gt;: 'sudo apt-get install ant'&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;subversion&lt;/u&gt;&lt;/b&gt;: 'sudo apt-get install subversion'&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;xmltask.jar&lt;/u&gt;&lt;/b&gt;:&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.oopsconsultancy.com/software/xmltask/" id="ek-x" style="color: #551a8b;" title="download"&gt;download&lt;/a&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;and move the jar file to $HOME/.ant/lib.&amp;nbsp;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;tomcat&lt;/u&gt;&lt;/b&gt;: download the&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://tomcat.apache.org/" id="k0qc" style="color: #551a8b;" title="tomcat server"&gt;tomcat server&lt;/a&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;(5.5.28 is the latest version at the time of writing, haven't tried anything except trunk with Tomcat 6). Extract the downloaded archive to your system (/opt in my case)&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;u&gt;a&lt;/u&gt;&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;hypersonic&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;u&gt;&lt;b&gt;database&lt;/b&gt;:&lt;/u&gt;&amp;nbsp;Grab one from the downloaded svn sources or from a downloaded biserver you have on your system. Switch to your own database later on, but try to get CBF running with hypersonic for your first build.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;grab a copy of the CBF's&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;u&gt;build.xml&lt;/u&gt;&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;from the&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://wiki.pentaho.com/display/COM/CBF+-+Community+Build+Framework" id="ao5n" style="color: #551a8b;" title="CBF wiki page"&gt;CBF wiki page&lt;/a&gt;. Extract to your CBF directory and rename the build.xml&amp;lt;VERSION&amp;gt; to&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;build.xml&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2 style="font-size: 14pt;"&gt;Create&amp;nbsp;&lt;/h2&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;CBF uses system directories that are shared between all projects in your CBF setup and a per-project-directory. &amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;The 'global' system directories are:&amp;nbsp;&lt;/div&gt;&lt;ul style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;u&gt;&lt;b&gt;source code folder(s)&lt;/b&gt;&lt;/u&gt;: every version of the source code will be kept in one folder. These source code files will be left unmodified. All changes to the original sources will be made through patches.&amp;nbsp;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;u&gt;&lt;b&gt;target-build&lt;/b&gt;&lt;/u&gt;: this is the default directory all source code files will be copied to to build the system. All patches will applied to this folder.&amp;nbsp;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;u&gt;&lt;b&gt;target-dist&lt;/b&gt;&lt;/u&gt;: the destination folder. This is where the Pentaho server will be copied to after everything has been built.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;The target-build and target-dist are dealt with by the ant build system, no user intervention is needed here.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Let's check out the source code! Move to your CBF folder and issue the command below to check out the sources for version 3.5.2 into a folder called '3.5.2.stable':&lt;/div&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="mvuk" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&amp;nbsp;svn co svn://source.pentaho.org/svnroot/bi-platform-v2/branches/3.5.2.stable&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Apart from the system directories, we need a directory per project to store our patches, configuration files and solutions (reports, xactions, ...).&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Move to your CBF directory and create a folder 'project-myProject', with three subdirectories: config, patches and solution.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Your project folder should look something like this:&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="il76" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;-- project-myProject:&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&amp;nbsp;&amp;nbsp; |------ config&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&amp;nbsp;&amp;nbsp; |------ patches&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&amp;nbsp;&amp;nbsp; |------ solution&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&amp;nbsp;&amp;nbsp; build.xml&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;In the config directory, we'll put a file called build.properties. This file will tell the ant build system what and where we want to build.&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;A minimal build.properties contains, among others, the path to your java compiler and your solution, application server and Pentaho server information.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Modify the example below and save this as your build.properties:&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="xvhd" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;table bgcolor="#cccccc" border="0" bordercolor="#000000" cellpadding="3" cellspacing="0" height="100%" id="dlzk" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;## Path to your java compiler (javac)&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;javac.path = /usr/lib/jvm/java-6-sun/bin/&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;## Solution path and solution deploy path.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;solution.path = /opt/pentaho/CBF/project-myProject/solution&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;solution.deploy.path = /opt/pentaho/CBF/project-myProject/solution&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;## Accepted server names are 'tomcat' and 'jboss'.&lt;br /&gt;server.name = tomcat&lt;br /&gt;## Path to your tomcat server.&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;tomcat.path = /opt/apache-tomcat-5.5.28/&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;## do you want to copy the 'steel-wheels' and 'bi-developers' samples to your server? true|false&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;copy.pentaho.samples = true&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;## options to pass to your Java Virtual Machine when starting the application server.&lt;br /&gt;## Modify at will, or leave untouched if unsure.&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;java.opts = -Xmx512m -XX:MaxPermSize=512m -Xrunjdwp:transport=dt_socket,address=8765,server=y,suspend=n&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;## Which Pentaho sources do you want to use to build your server?&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;pentaho.dir = 3.5.2.stable/&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;## What is the target build directory?&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;pentaho.build.dir = target-build/&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Next, we need to tell our server where to find the solution folder. As this is set in &amp;nbsp;the '&lt;b&gt;solution-path&lt;/b&gt;' parameter in web.xml, we'll need to patch this file in our server.&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Patches are put in the patches-directory in exactly the same directory structure as they are in the original source tree.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;So, to patch web.xml found in '&lt;b&gt;3.5.2.stable/bi-platform-appserver/webapps/pentaho/WEB-INF/web.xml&lt;/b&gt;', we create a directory called '&lt;b&gt;target-dist/server/webapps/pentaho/WEB-INF/&lt;/b&gt;' and copy the web.xml there.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;In this file, we'll fill in the '&lt;b&gt;param-value&lt;/b&gt;' for the element '&lt;b&gt;param-name&lt;/b&gt;' to '&lt;b&gt;@solution.deploy.path@&lt;/b&gt;'. The @###@-syntax fills in the value we specified for this variable in build.properties.&amp;nbsp;&lt;/div&gt;Your patches directory should now contain one file:&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="gl2r" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;patches/target-dist/server/webapps/pentaho/WEB-INF/web.xml&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Web.xml should hold at least one variable:&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="v2g-" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;lt;web-app&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;context-param&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;param-name&amp;gt;solution-path&amp;lt;/param-name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;param-value&amp;gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;@solution.deploy.path@&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;lt;/param-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/context-param&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;... &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Your solution-folder can hold anything like any other (pentaho-)solutions folder. We have set 'copy.pentaho.samples' to 'true' in our build.properties. This will copy the bi-developers and steel-wheels samples to our pentaho-solutions folders, so there's no immediate need to add any other sources.&lt;br /&gt;&lt;br /&gt;&lt;h2 style="font-size: 14pt;"&gt;Build&lt;/h2&gt;This is the time to start your hypersonic database. Go to your sources or biserver/data directory and run&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;start-hypersonic.sh&lt;/b&gt;.&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Once your hypersonic (or other database) server is running, it's time to start building our server (Use '&lt;b&gt;ant -Dproject=myProject -p&lt;/b&gt;' to get a list of parameters to pass to build.xml).&amp;nbsp;&lt;/div&gt;&lt;br /&gt;Issue the command below to clean up all traces of previous builds and to build and run the system.&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" id="gf_:" style="border-collapse: collapse; font-size: 1em; line-height: inherit;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left;"&gt;&lt;td width="100%"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;ant -Dproject=myProject dist-clean all run&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Have a look at all the build messages scrolling by until you see the line 'INFO: Server startup in &amp;lt;number&amp;gt; ms', check your server and pop a cork to celebrate your entry in the wonderful world of CBF. &lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img alt="" class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=f2f9c9ce-44af-8915-9eaa-c3ebc1b7da11" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-1441935580946306370?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/1441935580946306370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=1441935580946306370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/1441935580946306370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/1441935580946306370'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2010/02/build-pentaho-in-three-easy-steps-with.html' title='Building Pentaho in three steps with CBF'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-6744068201998382801</id><published>2009-11-29T04:25:00.001-08:00</published><updated>2010-09-17T07:39:05.662-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho prd prd3.5 crosstab pivot'/><title type='text'>Crosstabs in PRD 3.5</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;div style="text-align: left;"&gt;&lt;h2&gt;Crosstabs&lt;/h2&gt;&lt;br /&gt;Crosstabs are an easy and relatively easy way to visualize tabular data along two or more axes. They are an indispensable part of a modern report engine.&lt;br /&gt;&lt;br /&gt;Although crosstabs still are an experimental feature in PRD 3.5, and as such are not up to par with their counterparts in Eclipse BIRT and the likes. They will not make it into 3.6 as a stable feature, but even being expermimental, they are already powerful enough to create some really useful reports.&lt;br /&gt;&lt;br /&gt;Will Gorman's &lt;a href="http://www.packtpub.com/pentaho-reporting-3-5-for-java-developers/" id="e4:7" title="book"&gt;book&lt;/a&gt; proved once again to be the best source for information regarding Pentaho Reporting. This post is an elaboration on the mainly textual explanation in his book... &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Create the Crosstab Report&lt;/h2&gt;We'll create a crosstab that will show the revenue and quantity orderd per product line for all months in a given year.&lt;br /&gt;Start by opening the report designer and press CTRL-ALT-O. You will be shown the alert message below. Although the message says to restart PRD, the crosstab functionality is immediately available without restart. &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="usf0" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_116fk2x5rn4_b" style="height: 111px; width: 457px;" /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;UPDATE:&lt;/u&gt;&lt;/b&gt; &lt;i&gt;The CTRL-ALT-O key combination has been replaced with a dialog in PRD 3.6. In Edit -&amp;gt; Preferences -&amp;gt; General, check the option 'Enable (unsupported) experimental features.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_lWqRaFGdjws/S7b0YEAEu8I/AAAAAAAAAV0/gpW2ZV1nJBE/s1600/Screenshot-Settings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_lWqRaFGdjws/S7b0YEAEu8I/AAAAAAAAAV0/gpW2ZV1nJBE/s320/Screenshot-Settings.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a new report, set it to (A4) landscape (File --&amp;gt; Page Setup) and create a datasource on SampleData with the query below. &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;table bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" class="" height="223" id="uxzq" style="margin-left: 0px; margin-right: auto; text-align: left; width: 680px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;select &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; distinct &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRODUCTLINE, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;T.MONTH_NAME, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(TOTALPRICE) as TOTALPRICE,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum(QUANTITYORDERED) as QUANTITYORDERED &lt;br /&gt;from&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PRODUCTS P &amp;nbsp;&amp;nbsp;&amp;nbsp; inner join ORDERFACT O on (P.PRODUCTCODE = O.PRODUCTCODE) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inner join DIM_TIME T on (O.ORDERDATE = T.TIME_ID) &lt;br /&gt;where &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; T.YEAR_ID = 2004&lt;br /&gt;group by &amp;nbsp;&amp;nbsp; PRODUCTLINE, &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH_NAME &lt;br /&gt;order by &amp;nbsp;&amp;nbsp; &amp;nbsp;PRODUCTLINE, &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T.MONTH_ID&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="c3v:" style="text-align: left;"&gt;Next, in the 'Structure' panel, right click on the Master Report node and select 'Add Crosstab Group'. This will add a new crosstab band to your report canvas.&lt;br /&gt;&lt;br /&gt;&lt;div id="d2-5"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_118crxw99gh_b" style="height: 301px; width: 374px;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="ni-c"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_119fwngnqp8_b" style="height: 146.785px; width: 648px;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Now, move over to the Structure panel. PRD 3.5 doesn't know about drag an drop or the report canvas to create crosstabs (experimental feature, anyone?), so every single property will have to be set in the structure panel. &lt;br /&gt;&lt;br /&gt;We want to see the sales results per product line for all months in a selected year. &lt;br /&gt;First, we'll define a row dimension (Product Line), a column dimension (Months) and our first detail dimension (Total Sales). &lt;br /&gt;In the Structure panel, open crosstab --&amp;gt; crosstab-row-group-body --&amp;gt; crosstab-row-group, specify 'PRODUCTLINE' as group in the Attributes panel. &lt;br /&gt;Next, right click the Group Header and add a string-field. In the Attributes panel, specify PRODUCTLINE as the value for the field property. &lt;br /&gt;&lt;br /&gt;&lt;div id="c.l2" style="text-align: left;"&gt;&lt;div id="xjdx" style="text-align: left;"&gt;&lt;div id="dyfq" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_122fwz7gvhg_b" style="height: 213px; width: 393px;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;More row groups can be added by right clicking 'crosstab-row-group' and selecting 'Add Crosstab Row Group'. &lt;br /&gt;&lt;br /&gt;We'll stick with the product lines for now and add the months columns. Select crosstab-column-group-body --&amp;gt; crosstab-column-group and set the group property to MONTH_NAME.&lt;br /&gt;Now, right click the Group Header, choose Add Element --&amp;gt; string-field and set the field property to MONTH_NAME.&lt;br /&gt;Go to the 'Style' panel, CTRL-click the PRODUCTLINE and MONTH_NAME string-fields and set them to bold. &lt;br /&gt;&lt;br /&gt;Finally, open the Details Body and add a number-field to the Details item. Set this number-fields' field property to TOTALPRICE.&lt;br /&gt;&lt;br /&gt;Your crosstab column section should now look something like the one below. &lt;br /&gt;&lt;br /&gt;&lt;div id="z8te" style="text-align: left;"&gt;&lt;div id="b7t0" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_125cm8xk9hd_b" style="height: 192px; width: 346px;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If you run a preview of your report at this point, you'll notice a layout problem:&lt;br /&gt;&lt;br /&gt;&lt;div id="yxz0" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_127vwnczsgk_b" style="height: 183px; width: 492px;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="go77" style="text-align: left;"&gt;&lt;div id="u101" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;Although the data is displayed correctly, the month names have not been positioned correctly above the corresponding data columns. &lt;br /&gt;This is easily solved by adding a label to the crosstab-row-group title-header (right click the crosstab-row-group's title-header, add element, label). &lt;br /&gt;&lt;br /&gt;&lt;div id="xf5y" style="text-align: left;"&gt;&lt;div id="ckn0" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_134ccp6n7gr_b" style="height: 138px; width: 319px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Remove or replace the default label text and set this label's width to the same value as the PRODUCTLINE string-field's. &lt;br /&gt;I have applied some additional formatting, but your crosstab should now look something like this: &lt;br /&gt;&lt;br /&gt;&lt;div id="ui:q" style="text-align: left;"&gt;&lt;div id="ikl1" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_129cbwphxf4_b" style="height: 253.525px; width: 648px;" /&gt;&lt;/div&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;Add a second measure&lt;/h2&gt;&lt;br /&gt;Add a second number-field to the crosstab's Details and set its field property to QUANTITYORDERED. &lt;br /&gt;We need this element to start after the total price, so set this element's x position to the width of the total sales element. &lt;br /&gt;&lt;br /&gt;&lt;div id="byjx" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_130d598s8c4_b" style="height: 89px; width: 300px;" /&gt;&lt;/div&gt;&lt;br /&gt;Next, change the width of the month name element in the crosstab-column-group's Group Header to the total width of the Total Sales and Quantity Ordered elements (110 in this example's case). &lt;br /&gt;Add two more label-fields to the Group Header. Show these labels right below the month name field by setting their y-position to the height of the month name, right-align them and sync their x-position to the corresponding columns. &lt;br /&gt;&lt;br /&gt;If you followed these steps, you now have a crosstab report that shows the sales and ordered quantities per month for every product line: &lt;br /&gt;&lt;div id="xlwb" style="text-align: left;"&gt;&lt;div id="s7q6" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcrxx8b4_132djxg2qcx_b" style="height: 225.191px; width: 648px;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Grab your copy of the report &lt;a href="http://www.bismart.be/crosstab.prpt" id="d_:l" title="here"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;/div&gt;Although there is still quite a lot of work to do, it already is possible to create some fairly decent crosstabs in PRD 3.5.&amp;nbsp; &lt;br /&gt;I haven't been able to get row banding or any of the standard summary functions to work on crosstabs. Will's book use MDX totals and mention similar SQL-workarounds (like Oracle's window functions) to display summaries in crosstabs, but this should (and probably will) be supported in future PRD releases.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img alt="" class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=588a2835-10f0-8269-83ac-24dfd6b5170e" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-6744068201998382801?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/6744068201998382801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=6744068201998382801' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/6744068201998382801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/6744068201998382801'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2009/11/crosstabs-in-prd-35.html' title='Crosstabs in PRD 3.5'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_lWqRaFGdjws/S7b0YEAEu8I/AAAAAAAAAV0/gpW2ZV1nJBE/s72-c/Screenshot-Settings.png' height='72' width='72'/><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-1883996531515537862</id><published>2009-11-05T12:49:00.000-08:00</published><updated>2009-11-20T23:13:31.794-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho prd prd3.5 osbi scripting javascript tooltip'/><title type='text'>Using Javascript in PRD 3.5</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;h2&gt;Introduction&lt;/h2&gt;One of the major changes that comes with Pentaho Report Designer (PRD) 3.5 is the ability to use Javascript code in reports. &lt;br /&gt;Scripting allows you to create highly interactive reports that allow your report users to explore their data in ways that are not possible with traditional static reports. &lt;br /&gt;We'll use javascript to create a tooltip that displays a product's properties. This javascript code will only be visible when the report is viewed as HTML, so other output formats (PDF, Excel, ...) are not impacted. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Report&lt;/h2&gt;We'll create a sales overview per productline on the SampleData database that comes with Pentaho. &lt;br /&gt;First of all, add a JDBC data source and create parameters for YEAR and MONTH. &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table cellspacing='0' cellpadding='3' bordercolor='#000000' border='1' bgcolor='#cccccc' width='595' height='415' id='a_2y' class=''&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width='100%'&gt;&lt;font size='1'&gt;select         distinct &lt;br /&gt;                 DIM_TIME.YEAR_ID,&lt;br /&gt;                 DIM_TIME.MONTH_DESC,&lt;br /&gt;                 PRODUCTS.PRODUCTCODE,&lt;br /&gt;                 PRODUCTNAME,&lt;br /&gt;                 PRODUCTLINE,&lt;br /&gt;                 PRODUCTDESCRIPTION,&lt;br /&gt;                 PRODUCTSCALE,&lt;br /&gt;                 PRODUCTVENDOR,&lt;br /&gt;                 QUANTITYINSTOCK,&lt;br /&gt;                 BUYPRICE,&lt;br /&gt;                 MSRP,&lt;br /&gt;                 SUM(QUANTITYORDERED) as QTY,&lt;br /&gt;                 AVG(PRICEEACH) as PRICEEACH,&lt;br /&gt;                 SUM(TOTALPRICE) as TOTAL&lt;br /&gt;from          PRODUCTS    inner join ORDERFACT on (PRODUCTS.PRODUCTCODE = ORDERFACT.PRODUCTCODE)&lt;br /&gt;                                   inner join DIM_TIME on (ORDERFACT.ORDERDATE = DIM_TIME.TIME_ID)&lt;br /&gt;where         DIM_TIME.YEAR_ID = ${YEAR}&lt;br /&gt;  and          DIM_TIME.MONTH_ID = ${MONTH}&lt;br /&gt;group by     PRODUCTS.PRODUCTCODE,&lt;br /&gt;                 PRODUCTNAME,&lt;br /&gt;                 PRODUCTLINE,&lt;br /&gt;                 PRODUCTDESCRIPTION,&lt;br /&gt;                 PRODUCTSCALE,&lt;br /&gt;                 PRODUCTVENDOR,&lt;br /&gt;                 QUANTITYINSTOCK,&lt;br /&gt;                 BUYPRICE,&lt;br /&gt;                 MSRP&lt;br /&gt;order by     PRODUCTLINE&lt;br /&gt;;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;Next, create a group for the product line, make the group header visible, and add product name, quantity, price each and total to the details band. &lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Javascript Code&lt;/h2&gt;With the report's structure in place, we're ready to add the Javascript to the report. &lt;br /&gt;Download Walter Zorn's tooltip javascript &lt;a id='qt9v' href='http://www.walterzorn.com/tooltip/tooltip_e.htm' title='library'&gt;library&lt;/a&gt; and unzip it. &lt;br /&gt;To include the library in your report, select the master report, go to the attributes tab and add the line below in the 'append-body' of the html section. &lt;br /&gt;This tag will be created as the first element in the &amp;lt;body&amp;gt; tag when added to the append-body property. The script throws an error if you try to put it in append-header (which puts it in the &amp;lt;head&amp;gt; section). &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table cellspacing='0' cellpadding='3' bordercolor='#000000' border='1' bgcolor='#cccccc' id='o0vv' class=''&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width='100%'&gt;&lt;font size='1'&gt;&amp;lt;script type="text/javascript" src="file://&amp;lt;PATH-ON-YOUR-SYSTEM&amp;gt;/wz_tooltip.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;If you include external javascript files in your report and want to use your report on the BI server, you need to make sure the Javascript file is available to Pentaho's web application after publishing. &lt;br /&gt;To access the script from the url below, I have put wz_tooltip.js in &amp;lt;APPSERVER&amp;gt;/webapps/pentaho/js. &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table cellspacing='0' cellpadding='3' bordercolor='#000000' border='1' bgcolor='#cccccc' id='jmfz' class=''&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width='100%'&gt;&lt;font size='1'&gt;&amp;lt;script type="text/javascript" src="http://localhost:8080/pentaho/js/wz_tooltip.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style='text-align: left;' id='wygp'&gt;&lt;div style='text-align: left;' id='pmho'&gt;&lt;img src='http://docs.google.com/File?id=dcrxx8b4_107c4q2c29z_b' style='width: 648px; height: 270.911px;'/&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2&gt;Call the Product Properties&lt;/h2&gt;Next we're going to tell the report object [PRODUCTNAME] we want it to create a tooltip when the mouse hovers over it. &lt;br /&gt;Select the product name and specify the on-mouse-over property in the html-events category. As we need to pass some report objects as product properties to the report, we have to specify a formula by clicking the green plus button. &lt;br /&gt;&lt;br /&gt;&lt;div style='text-align: left;' id='icgx'&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style='text-align: left;' id='lorq'&gt;&lt;img src='http://docs.google.com/File?id=dcrxx8b4_108c3fvprdd_b' style='width: 648px; height: 136.648px;'/&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table cellspacing='0' cellpadding='3' bordercolor='#000000' border='1' bgcolor='#cccccc' width='648' height='105' id='fi95' class=''&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width='100%'&gt;&lt;font size='1'&gt;="Tip('&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;amp;quot;2&amp;amp;quot;&amp;gt;Product Details:&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; &lt;b&gt;SUBSTITUTE([PRODUCTDESCRIPTION]; "'"; "&amp;amp;#39;")&lt;/b&gt; &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Vendor:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; [PRODUCTVENDOR] &amp;amp;  "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Scale:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; [PRODUCTSCALE] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;In stock:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; [QUANTITYINSTOCK] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Buy Price:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;€ " &amp;amp; [BUYPRICE] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;MSRP:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;€ " &amp;amp; [MSRP] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;', BGCOLOR, '#f0f8fe', DELAY, 600, WIDTH, -450, OFFSETY, 15, FONTCOLOR, '#3b7eaf', BORDERCOLOR, '#3b7eaf');"&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;This formula calls the WZ library's Tip function with the string to display in the tooltip and some formatting parameters. The tooltip message can contain HTML code, so we create a table with a header that spans two columns. The left column of this table is filled with the property names ('Description, Vendor, Scale, In Stock, Buy Price and MSRP). The values for these properties are filled in when the HTML for this report is generated.  &lt;br /&gt;Some product descriptions contain single quotes that need to be escaped to avoid parsing troubles (bold section). &lt;br /&gt;After the product detail table, some formatting options are passed to the script. Check &lt;a id='ck_g' href='http://www.walterzorn.com/tooltip/tooltip_e.htm#docu' title='the script&amp;apos;s website'&gt;the script's website&lt;/a&gt; for a full reference of all possible properties. &lt;br /&gt;&lt;br /&gt;If you run the report at this point, you will see a tooltip when you hover the mouse over a product name shortly. &lt;br /&gt;However, when you move the mouse away from product names, you'll notice that the last tooltip sticks to the pointer. &lt;br /&gt;&lt;br /&gt;&lt;div style='text-align: left;' id='wkgv'&gt;&lt;img src='http://docs.google.com/File?id=dcrxx8b4_109cjjcwmgk_b' style='width: 648px; height: 148.513px;'/&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We have specified what happens when we move the mouse &lt;i&gt;over&lt;/i&gt; the product name, now we need to tell the script what needs to happen when we move the pointer &lt;i&gt;away&lt;/i&gt; from the product names. &lt;br /&gt;There is no on-mouse-out property in the Attributes panel. I unzipped the .prpt file and found the on-mouse-over property's behavior is specified in layout.xml. I tried manually adding the onmouseout event in this file, but that didn't work (which makes sense). &lt;br /&gt;I then added a little piece of Javascript code to the report that creates an event listener for mouseout events. With this event in place, we can safely call the library's UnTip() method to get rid of the tooltip when the cursor leaves that product names. &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table cellspacing='0' cellpadding='3' bordercolor='#000000' border='1' bgcolor='#cccccc' id='e6iu' class=''&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width='100%'&gt;&lt;font size='1'&gt;&amp;lt;script type="text/javascript" &amp;gt;&lt;br /&gt;  function addMouseOutEvent(elem){&lt;br /&gt;      elem.onmouseout=clearTip;&lt;br /&gt;      if(elem.captureEvents) elem.captureEvents(Event.MOUSEOUT);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  function clearTip(){&lt;br /&gt;      UnTip();&lt;br /&gt;  }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;Add this piece of code to the Master Page's append-header attribute to put it in the &amp;lt;head&amp;gt; section of the report HTML document. &lt;br /&gt;Put a call to the addMouseOutEvent to the on-mouse-over formula to avoid modifying the tooltip library. &lt;br /&gt;Your formula should now look something like the one below, and the tooltip should disappear when you move the pointer away from the product names. &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table cellspacing='0' cellpadding='3' bordercolor='#000000' border='1' bgcolor='#cccccc' width='649' height='105' id='gpqk' class=''&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width='100%'&gt;&lt;font size='1'&gt;="&lt;b&gt;addMouseOutEvent(this); &lt;/b&gt;Tip('&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;amp;quot;2&amp;amp;quot;&amp;gt;Product Details:&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; SUBSTITUTE([PRODUCTDESCRIPTION]; "'"; "&amp;amp;#39;") &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Vendor:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; [PRODUCTVENDOR] &amp;amp;  "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Scale:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; [PRODUCTSCALE] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;In stock:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" &amp;amp; [QUANTITYINSTOCK] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Buy Price:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;€ " &amp;amp; [BUYPRICE] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;MSRP:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;€ " &amp;amp; [MSRP] &amp;amp; "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;', BGCOLOR, '#f0f8fe', DELAY, 600, WIDTH, -450, OFFSETY, 15, FONTCOLOR, '#3b7eaf', BORDERCOLOR, '#3b7eaf');"&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style='text-align: left;' id='almc'&gt;&lt;img src='http://docs.google.com/File?id=dcrxx8b4_110dprn2wgn_b' style='width: 648px; height: 288.258px;'/&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Download this report and the tooltip script &lt;a id='xkv9' href='http://www.bartmaertens.be/javascript-in-prd3.5.tar.gz' title='here'&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=3a7f73fc-85e0-840b-9594-5b23c2767ca1' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-1883996531515537862?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/1883996531515537862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=1883996531515537862' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/1883996531515537862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/1883996531515537862'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2009/11/using-javascript-in-prd-35_05.html' title='Using Javascript in PRD 3.5'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-5686399139753583071</id><published>2009-10-18T05:37:00.003-07:00</published><updated>2009-11-20T23:14:47.048-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho prd prd3.5 osbi sparklines visualization'/><title type='text'>Creating Sparklines in Pentaho Report Designer 3.5</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Sparklines &lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;font face='verdana'&gt;Sparklines in Pentaho Report Designer (PRD) 3.5 accept data in the form of a comma separated (CSV-like) list or as an array of number objects. &lt;/font&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;span style='background-color: rgb(255, 255, 255);'&gt;The types of sparklines that can be created are bar, line and pie chart. &lt;/span&gt;As has been discussed &lt;a id='vfd4' href='http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=00018S' title='over'&gt;over&lt;/a&gt; and &lt;a id='urs1' href='http://www.google.be/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;ved=0CAwQFjAA&amp;amp;url=http%3A%2F%2Fwww.perceptualedge.com%2Farticles%2F08-21-07.pdf&amp;amp;ei=ihvaSoSbH82Q-Ab305nMDQ&amp;amp;usg=AFQjCNHF_RybAzTTyWKv4UnUWKN4QSDUoA&amp;amp;sig2=O5CP8Xdh1MZH00CFQ0H9KA' title='over'&gt;over&lt;/a&gt; and &lt;a id='eo0e' href='http://www.juiceanalytics.com/writing/the-problem-with-pie-charts/' title='over'&gt;over&lt;/a&gt; again, pie charts are bad design. In my opinion, series/(spark)lines of pie chart only make matters (so much) worse, sop I'll just pretend I never heard about them and ignore them. &lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Sparklines can be created using a report element or through a function. Both approaches have the same results, but a function's results can be passed on to other functions or expressions. &lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Create a Data Source&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;div&gt;&lt;font face='verdana'&gt;We'll create a data source on the Pentaho SampleData database in MySQL. Notice how the highlighted line uses MySQL's &lt;a title='group_concat' href='http://dev.mysql.com/doc/refman/5.1/en/group-by-functions.html#function_group-concat' id='tqrf'&gt;group_concat&lt;/a&gt; function to create a comma separated list of all values in the group, which is exactly what we need.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='fy3j' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 648px; height: 220.868px;' src='http://docs.google.com/File?id=dcrxx8b4_78cw3hdcqm_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Click the preview button to verify your query. The preview doesn't know about query parameters and will show a blank window if your query is (syntactically) correct. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Add the Sales Sparkline&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Drag a line-sparkline element from the left toolbar into the details band. Double click and select 'SALESDETAILS'. The field and more optionscan be set from the panel on the right hand side. Make sure you are in the structure/attributes-tab. Leave the type to the default (line-sparkline), and select 'SALESDETAILS' as the field name. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img id='mfoo' style='width: 482px; height: 151px;' src='http://docs.google.com/File?id=dcrxx8b4_79fhwqwxgj_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;The layout and visualization of the sparkline can be changed from the 'Style' tab properties. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Interesting changes are the lastcolor, which shows a dot in the chosen color to indicate the last value, and text-color to specify the line color. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Additionally, you may want to enable anti-aliasing in the 'Object' properties have smoother lines. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div id='k.qf' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 446px; height: 188px;' src='http://docs.google.com/File?id=dcrxx8b4_80cf6z2dgf_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt; &lt;/div&gt;&lt;font face='verdana'&gt;A preview of the sparkline in your report should look similar to the one below. Note the differences in sales data volumes between the product lines.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='k7jr' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 439px; height: 365px;' src='http://docs.google.com/File?id=dcrxx8b4_81c35wkjgf_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Add the Quantities data to the query&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;font face='verdana'&gt;We'll now add data for a second sparkline to the report by adding the lines below to your query. We want this sparkline to show the average quantities for the last and the six preceding months.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Add six columns (QTYM1 through QTYM6) to your query, one per month for the quantities sold over the last six months for every product line. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='cruu' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 648px; height: 306.947px;' src='http://docs.google.com/File?id=dcrxx8b4_82dqtxmzkn_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Use functions to format the data&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;We'll need to create either an array of numbers or a CSV-like list from these columns. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;To create a CSV-like list directly in the query, we could have used the MySQL concat-function. We have LibFormula functions to do this in the report. Go to the data tab, right-click 'Functions', click 'Add Function' and pick 'Common \ Open Formula'. In the function properties, change the name to 'QtySparkLine', and modify the formula like show below.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='hsw7' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 587px; height: 271px;' src='http://docs.google.com/File?id=dcrxx8b4_85zh4fwkgm_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Creating a CSV-like list is very similar to creating an array: add an Open Formula function to the report, change the name to QtySparkLine, but change the formula to =[OBJ1] &amp;amp; "," &amp;amp; [OBJ2] ... &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='tl6h' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 648px; height: 233.383px;' src='http://docs.google.com/File?id=dcrxx8b4_86dn8gs5c5_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt; &lt;/font&gt;&lt;/div&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Add the Quantities Sparkline&lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;font face='verdana'&gt;Drag a bar-sparkline element to the detail band. Double click and select QtySparkLine, or go to Structure \ Attributes, and specify QtySparkLine as the field attribute value. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;The 'sparkline' attribute group holds one element, 'spacing'. This property specifies the amount of spacing that is used between the bars in our sparkline. The default value is 2, let's change it to 1. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;Switch to the Style tab. In the 'Sparkline' group, we have 'high-color' and 'lastcolor'. The lastcolor-property is the same as with the line-sparkline: it is used to specify the color of the last value in the sparkline. The QTY column, added to the right of the sparkline, provides the exact value of the last item in the sparkline for reference. &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;The high-color changes sets the bar color for all values in the sparkline that have a higher value than the last value (although I haven't found any documentation on this property and haven't looked it up in the source code yet). &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;You Style properties should look something like this: &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='qh4c' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 648px; height: 173.281px;' src='http://docs.google.com/File?id=dcrxx8b4_87g62xcfgg_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;h2&gt;&lt;font face='verdana'&gt;Run &lt;/font&gt;&lt;/h2&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;The sparklines in your report should now look similar to the ones below. That's all it there is to creating sparklines in PRD 3.5... &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div id='go2t' style='text-align: left;'&gt;&lt;font face='verdana'&gt;&lt;img style='width: 648px; height: 367.232px;' src='http://docs.google.com/File?id=dcrxx8b4_88d69p5tdx_b'/&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt; &lt;blockquote&gt;&lt;font face='verdana'&gt;&lt;br /&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=0ece0b4f-2825-86ac-95a9-865fa580023a' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-5686399139753583071?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/5686399139753583071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=5686399139753583071' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/5686399139753583071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/5686399139753583071'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2009/10/creating-sparklines-in-pentaho-report.html' title='Creating Sparklines in Pentaho Report Designer 3.5'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8309597261528663292.post-6721074963516275356</id><published>2009-09-26T10:19:00.001-07:00</published><updated>2009-11-20T23:16:08.160-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pentaho osbi cdf dashboard'/><title type='text'>Dynamically Creating a Pentaho CDF Dashboard</title><content type='html'>&lt;h3&gt;Dashboard Structure&lt;br /&gt;&lt;/h3&gt;I recently had to create a dashboard where objects needed to be created and added dynamically depending on the user's input. &lt;br /&gt;As this dashboard shows the power and flexibility of &lt;a href='http://www.webdetails.pt' target='_blank'&gt;Pedro Alves&lt;/a&gt;' &lt;a title='Community Dashboard Framework' target='_blank' href='http://wiki.pentaho.com/display/COM/Community+Dashboard+Framework'&gt;Community Dashboard Framework&lt;/a&gt;, I have reworked it to work with the SampleData database that comes with a &lt;a title='Pentaho' target='_blank' href='http://www.pentaho.com'&gt;Pentaho&lt;/a&gt; installation. &lt;br /&gt;&lt;br /&gt;The layout of this dashboard is pretty simple. There are two global parameters (year and month) that apply to all objects in the dashboard.&lt;br /&gt;&lt;p&gt;&lt;img width='172' height='148' src='http://docs.google.com/File?id=dcrxx8b4_65gqqv3qc8_b' style='float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;' id='zxbo'/&gt; &lt;/p&gt;&lt;p&gt;The user can select a single year, and has the option to choose one&lt;br /&gt;single month or 'All' for all months in the selected year. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;The dashboard is structured per row: three objects are shown per product line (the objects in this example are the top 10 for revenue per product, margin per product and revenue per country). &lt;br /&gt;&lt;p&gt;Similar to the month parameter's behavior, it is possible to choose a single product line or 'All' for the total of all product lines. If all product lines are chosen, the selected row is used to display the total for all product lines. Below the totals, a new line is created for every product line.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Apart from the 'All' option, an extra option '-' has been added to the month and product lines lists of values to prevent the first value in the list from being selected by default. &lt;/p&gt;&lt;div style='text-align: left;' id='q244'/&gt;&lt;div style='text-align: left;' id='q244'&gt;&lt;img width='984' height='300' src='http://docs.google.com/File?id=dcrxx8b4_66ddpn6zhb_b' style='float: none;'/&gt;&lt;/div&gt;&lt;h3&gt;Template&lt;br /&gt;&lt;/h3&gt;The dashboard lives in a directory  'dyncdf' with a subdirectory 'dynamic-cdf'. Apart from the default files (index.xml, index.properties, ...), the&lt;br /&gt;dashboard's properties are specified dynamic-cdf.xcdf.&lt;br /&gt;The &amp;lt;style&amp;gt; tag specifies we'll use the template &amp;lt;solution-folder&amp;gt;/system/pentaho-cdf/template-dashboard-dynamic-cdf.html&lt;br /&gt;This template contains the structure (html) of the document the dashboard will be put into: &lt;br /&gt;&lt;br /&gt;&lt;img alt='' src='http://lh5.ggpht.com/_lWqRaFGdjws/Sr5AJWElhgI/AAAAAAAAAUA/tyTv4uQREwA/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br /&gt;&lt;br /&gt;The dashboard's structure is defined in template.html, the javascript code is saved in a separate file (scripts/dyncdf.js) and is called through the metalayer (first line in code block below). There are three static blocks (divs) that make up the layout of the dashboard: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;paramDiv&lt;/i&gt;: holds the year and month parameters &lt;/li&gt;&lt;li&gt;&lt;i&gt;navDivTop&lt;/i&gt;: provides a button to add and/or remove product lines. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;navDivBottom&lt;/i&gt;: the same functionality as in navDivTop was added at the bottom of the&lt;br /&gt;page again for usability reasons. navDivBottom is visible as soon as&lt;br /&gt;the dashboard contains three rows. &lt;/li&gt;&lt;/ul&gt;The dashboard's content rows are created between navDivTop and navDivBottom. &lt;br /&gt;&lt;br /&gt;&lt;img alt='' src='http://lh3.ggpht.com/_lWqRaFGdjws/Sr5AK1q5n8I/AAAAAAAAAUE/RJ6x-ltuw7A/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br /&gt;&lt;div&gt;&lt;h3&gt;Create the DIVs and dashboard components&lt;br /&gt;&lt;/h3&gt;&lt;div&gt;As &lt;i&gt;some&lt;/i&gt; dashboard content needs to be added and removed dynamically, it doesn't make sense not to generate &lt;i&gt;all&lt;/i&gt; content dynamically (except for the year and month parameters).  &lt;br /&gt;&lt;br /&gt;The javascript code contains several functions, the most important being addPLine(auto) and removePLine(). addPLine(auto) creates the html&lt;br /&gt;structure and objects for a new dashboard row. The 'auto' parameter indicates if we are creating a set of rows for all products lines: if null, a single row is created, if 'All', a new row is created for every product line in the loop. &lt;br /&gt;removePLine() removes the last line from the dashboard. &lt;br /&gt;&lt;br /&gt;The addPLine function calls createDiv(rowNb) to create the html structure for the new row and createPLine(auto), which creates the&lt;br /&gt;product line selector objects for every new row. Upon being created, every product line selector component creates its own content components by calling createComponents. The createComponents passes through functions that create the CDF (JSON) objects, and then adds them to the dashboard (tmp = JSON object). &lt;br /&gt;&lt;br /&gt;&lt;img alt='' src='http://lh4.ggpht.com/_lWqRaFGdjws/Sr5AOCWJsFI/AAAAAAAAAUI/W5me0k7q9VY/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br /&gt;&lt;br /&gt;In the product lines' postChange function is checked whether the selected item is 'All' and news have to be created for all product lines.  &lt;br /&gt;The (MDX) queries for the three graph components are created depending on whether all or a single product line(s)/month(s) is/are selected. &lt;br /&gt;The createDiv(auto) function creates dashboard rows for each desired product line in the structure below: &lt;br /&gt;&lt;br /&gt;&lt;img alt='' src='http://lh4.ggpht.com/_lWqRaFGdjws/Sr5AOylSD9I/AAAAAAAAAUM/nwz9W_3axoo/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br /&gt;&lt;br /&gt;When 'All' in product lines is selected, after all rows have been created, a second loop runs over all newly created rows and sets the correct product line selected. &lt;br /&gt;As Javascript does not fire an onChangeEvent when a selected item i a select element is changed programmatically, a call to 'Dashboards.processChange("pLineSelector" + i);' is necessary to notify the dashboard of the element's changed value. &lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Modifications to the default Pentaho installation&lt;/h3&gt;&lt;h4&gt;Modifications to the Steel Wheels cube&lt;/h4&gt;&lt;div&gt;The default Steel Wheels cube is modified slightly to better fit this dashboard: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;the Markets dimension has a new hierarchy with only the country&lt;/li&gt;&lt;li&gt;the Product dimension has a new hierarchy with Line and Product levels (and not the vendor)&lt;/li&gt;&lt;li&gt;the Time dimension has a new hierarchy with Years and Months levels (and not the Quarters)&lt;/li&gt;&lt;li&gt;a new Margin (calculated member) measure has been added (sales - (quantity * price each)) &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;h4&gt;Modification to JFreeChart.xaction&lt;/h4&gt;&lt;div&gt;The jFreeChartComponent in CDF maps all possible attributes in xactions to a 'one size fits all' Action Sequence.&lt;br /&gt;There is no parameterizating of the bar color for bar charts in this component, but that only requires a small modification: the .xaction included with CDF contains 14 hard-coded parameters for the color-palette parameters. These can be parameterized by adding COLOR-PALETTE1 through COLOR-PALETTE14 as children of the&lt;br /&gt;&amp;lt;inputs&amp;gt; element.  Specifying the default-value allows to use the previously hard coded value if no color was passed from the component. &lt;br /&gt;&lt;br /&gt;&lt;img alt='' src='http://lh3.ggpht.com/_lWqRaFGdjws/Sr5AQVmT3lI/AAAAAAAAAUQ/lSN8Vh5OqoA/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;The palette-colors inputs can be called later in the ChartComponent definition: &lt;br /&gt;&lt;br /&gt;&lt;img alt='' src='http://lh5.ggpht.com/_lWqRaFGdjws/Sr5ARFSSvBI/AAAAAAAAAUU/M46NhKt3LXI/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installation&lt;/h3&gt;Just &lt;a href='http://www.bartmaertens.be/pentaho-solutions.tar.gz' target='_blank'&gt;download&lt;/a&gt; and unzip in your solutions folder. &lt;br /&gt;All files should go in the right places. Make sure you have a 'sampledata' data source. Move the default steelwheels.mondrian.xml out of the way and publish the schema in the archive. &lt;br /&gt;This was developed and tested on Firefox/Ubuntu. What I've done with this on Chrome and IE can hardly be called testing, but everything seemed to work. Opera returned some error that I didn't bother to investigate. &lt;br /&gt;&lt;br /&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=0939f7a0-7287-8e2c-8a27-411e3653443c' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8309597261528663292-6721074963516275356?l=b-e-o.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://b-e-o.blogspot.com/feeds/6721074963516275356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8309597261528663292&amp;postID=6721074963516275356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/6721074963516275356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8309597261528663292/posts/default/6721074963516275356'/><link rel='alternate' type='text/html' href='http://b-e-o.blogspot.com/2009/09/dynamically-creating-pentaho-cdf_9214.html' title='Dynamically Creating a Pentaho CDF Dashboard'/><author><name>Bart Maertens</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_lWqRaFGdjws/Sr5AJWElhgI/AAAAAAAAAUA/tyTv4uQREwA/s72-c/%5BUNSET%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
