<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Analyse This &#187; Tutorials</title>
	<atom:link href="http://www.prashantraju.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.prashantraju.com</link>
	<description>The Trials and Tribulations of a Data Analyst</description>
	<lastBuildDate>Mon, 30 Aug 2010 10:22:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Pentaho 3.6 with Microsoft SQL Server</title>
		<link>http://www.prashantraju.com/2010/08/pentaho-3-6-with-microsoft-sql-server/</link>
		<comments>http://www.prashantraju.com/2010/08/pentaho-3-6-with-microsoft-sql-server/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 10:22:30 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[BI Server]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1615</guid>
		<description><![CDATA[Yep, you read right, I have now updated the guide so that it now includes Microsoft SQL Server 2005+. Big thanks goes out to Roland Bouman who sent me the necessary configurations files and drivers needed for this to work, so head over to his blog and give him a hug or just thank him. [...]]]></description>
			<content:encoded><![CDATA[<p>Yep, you read right, I have now updated the guide so that it now includes Microsoft SQL Server 2005+. Big thanks goes out to <a href="http://rpbouman.blogspot.com/">Roland Bouman</a> who sent me the necessary configurations files and drivers needed for this to work, so head over to his blog and give him a hug or just thank him.</p>
<p>You can grab a copy of the guide in Google Docs format and the SQL Script Pack at the <a href="http://www.prashantraju.com/projects/pentaho/">projects page</a>.</p>
<p>As always please let me know if you find any errors and also if you would like to see any further additions to guides and support for other databases.</p>
<p>Prashant.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/08/pentaho-3-6-with-microsoft-sql-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Pentaho 3.6 with MySQL, PostgreSQL &amp; Oracle.</title>
		<link>http://www.prashantraju.com/2010/06/pentaho-3-5-with-mysql-postgresql-oracle/</link>
		<comments>http://www.prashantraju.com/2010/06/pentaho-3-5-with-mysql-postgresql-oracle/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 21:00:48 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[BI Server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://localhost/analysethis/?p=88</guid>
		<description><![CDATA[Updated 16/06/2010 This guide has been tested and works with the latest version of Pentaho BI Server 3.6. Updated 28/02/2010 This guide has been tested and works with the latest version of Pentaho BI Server 3.5.2. Updated 09/02/2010 All the guides have been updated as well as the MySQL and PostgreSQL SQL Packs. I have [...]]]></description>
			<content:encoded><![CDATA[<h3>Updated 16/06/2010</h3>
<p>This <a title="Projects -  Pentaho" href="http://www.prashantraju.com/projects/pentaho/" target="_self">guide</a> has been tested and works with the latest version of <a href="http://sourceforge.net/projects/pentaho/files/" target="_blank">Pentaho BI Server 3.6</a>.</p>
<p><span id="more-88"></span></p>
<h3>Updated 28/02/2010</h3>
<p>This <a title="Projects -  Pentaho" href="http://www.prashantraju.com/projects/pentaho/" target="_self">guide</a> has been tested and works with the latest version of <a href="http://sourceforge.net/projects/pentaho/files/" target="_blank">Pentaho BI Server 3.5.2</a>.</p>
<h3>Updated 09/02/2010</h3>
<p>All the <a title="Projects - Pentaho" href="../projects/pentaho/" target="_self">guides</a> have been updated as well as the MySQL and PostgreSQL SQL Packs. I have  made a bunch of fixes to grammatical and spelling errors (ouch!),  cleaned up the layout and process flow, extended the Java and  Tomcat-Apache sections and added SMTP and Publishing sections (all  changes are listed on the front page of each <a title="Projects -  Pentaho" href="../projects/pentaho/" target="_self">guide</a>).</p>
<p>Last year I created a tutorial on how to install <a title="Pentaho Business Intelligence Server 2.0 with MySQL and Linux" href="http://www.prashantraju.com/projects/pentaho-tutorials/#server2.5" target="_self">Pentaho Business Intelligence Server 2.0 with MySQL on Linux</a> and the response was overwhelming with the amount of people who found the tutorial helpful.</p>
<p>I have taken the suggestions and feedback and have updated the tutorial for 3.5 and added PostgreSQL 8+ and Oracle 10g (XE and 11g) to the list, all the tutorials are split up for Windows and Linux operating systems.</p>
<p>Can&#8217;t wait? Head over to the <a title="Pentaho" href="http://www.prashantraju.com/projects/pentaho/" target="_self">Pentaho</a> project page and start downloading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/06/pentaho-3-5-with-mysql-postgresql-oracle/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Using Variables (?) with Table Input Steps.</title>
		<link>http://www.prashantraju.com/2010/06/using-variables-with-table-input-steps/</link>
		<comments>http://www.prashantraju.com/2010/06/using-variables-with-table-input-steps/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 13:24:34 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Data Integration]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1477</guid>
		<description><![CDATA[Using arguments with Pentaho Data Integration (PDI) transformations are extremely handy when trying to pass through dynamic information. In this tutorial I will show how you can implement variables (denoted by ?) within SQL statements using Table input steps. Along with using variables I also cover how to copy and get rows from the result [...]]]></description>
			<content:encoded><![CDATA[<p>Using arguments with Pentaho Data Integration (PDI) transformations are extremely handy when trying to pass through dynamic information. In this tutorial I will show how you can implement variables (denoted by ?) within SQL statements using Table input steps. Along with using variables I also cover how to copy and get rows from the result (memory), how to use system information and debugging steps. This tutorial was done with version PDI 3.2.0.</p>
<p><span id="more-1477"></span></p>
<h3>Scenario.</h3>
<p>I have two separate data sources, the first data source (ds01) has information about my employees i.e. employee code, office location, created date. My second data source (ds02) has satisfaction survey responses for each employee which was provided by an external company i.e. employee code, question title, response. I would like to retrieve for each employee the question and response from the satisfaction survey but <strong>only</strong> for employees who were created in the last month.</p>
<h3>Flow.</h3>
<p>The flow of the Jobs and Transformations which will make up this ETL process are:</p>
<ul>
<li><strong>Job</strong> : Process employee satisfaction
<ul>
<li><strong>Transformation</strong> : Get employee details
<ul>
<li><strong>Get system data</strong> : Get last months date</li>
<li><strong>Table input </strong>: Get employee data</li>
<li><strong>Copy rows to result</strong></li>
</ul>
</li>
<li><strong>Transformation</strong> : Get employee satisfaction
<ul>
<li><strong>Get rows from result</strong></li>
<li><strong>Table input </strong>: Get satisfaction data</li>
<li><strong>Excel output </strong>: Store results</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Data sets.</h3>
<p>The first data set ds01 (employee data) looks like this:</p>
<table>
<tbody>
<tr>
<th>emp_code</th>
<th>created_on</th>
</tr>
<tr>
<td>100000</td>
<td>12/02/2010</td>
</tr>
<tr>
<td>100001</td>
<td>05/05/2010</td>
</tr>
</tbody>
</table>
<p>The second data set ds02 (satisfaction data) looks like this:</p>
<table>
<tbody>
<tr>
<th>emp_code</th>
<th>question_title</th>
<th>response</th>
</tr>
<tr>
<td>100000</td>
<td>Rate your experience with the company</td>
<td>8</td>
</tr>
<tr>
<td>100001</td>
<td>Rate your experience with the company</td>
<td>5</td>
</tr>
</tbody>
</table>
<h3>Step 1. Create the parent Job.</h3>
<p>The first step is to create the parent Job, <strong>Process employee satisfaction.</strong> Once PDI has started to create a <strong>New Job</strong> you can either click on the <strong>File &gt; New &gt; Job</strong> option or use the <strong>CTRL + ALT + N</strong> shortcut.</p>
<p><img class="alignnone size-full wp-image-1501" title="Create a new job" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-07-at-8.45.02-PM.png" alt="Create a new job" width="241" height="74" /></p>
<p>Save the Job (using the <strong>File &gt; Save </strong>option or <strong>CTRL+S </strong>shortcut) and name the file <strong>Process employee satisfaction</strong>.</p>
<p><img class="alignnone size-full wp-image-1500" title="Save the job" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-07-at-8.44.07-PM.png" alt="Save the job" width="351" height="93" /></p>
<h3>Step 2. Create the Shared Database connections.</h3>
<p>The next step is to create two shared database connections one for <strong>ds01</strong> the other for <strong>ds02.</strong> While the <strong>Process employee satisfaction</strong> job is open make sure the <strong>View</strong> tab is visible (in the left hand side pane) and right click on the <strong>Database connections </strong>item and select the <strong>New</strong> option.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-07-at-8.51.02-PM.png" target="_blank"><img class="alignnone size-full wp-image-1503" title="Database connections &gt; New" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-07-at-8.51.02-PM.png" alt="Database connections &gt; New" width="400" height="214" /><br />
</a></p>
<p>The <strong>Database Connection</strong> window will appear. You will then to fill out the available options for your database connection, as an example <strong>ds01</strong> uses a MySQL database so my options after they were filled out looked like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.25.47-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1507" title="Database Connection window, ds01" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.25.47-PM-300x258.png" alt="Database Connection window, ds01" width="300" height="258" /></a></p>
<ul>
<li><strong>Connection Name</strong> : Name of your connection i.e. ds01</li>
<li><strong>Host Name </strong>: Host of your database server i.e. localhost</li>
<li><strong>Database Name </strong>: Name of the database which holds your information i.e. employees</li>
<li><strong>Port Number</strong> : Port which your database is listening on i.e. 3306</li>
<li><strong>Username </strong>:  User to access the database i.e. root</li>
<li><strong>Password </strong>: Password to access the database</li>
</ul>
<p>For <strong>ds02</strong> my connection options looked like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.31.48-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1510" title="Database connection window, ds02" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.31.48-PM-300x260.png" alt="Database connection window, ds02" width="300" height="260" /></a></p>
<ul>
<li><strong>Connection Name</strong> : Name of your connection i.e. ds02</li>
<li><strong>Host Name </strong>: Host of your database server i.e. localhost</li>
<li><strong>Database Name </strong>: Name of the database which holds your  information i.e. satisfaction</li>
<li><strong>Port Number</strong> : Port which your database is listening on i.e.  3306</li>
<li><strong>Username </strong>:  User to access the database i.e. root</li>
<li><strong>Password </strong>: Password to access the database</li>
</ul>
<p>After filling out the required fields you should always test your connection by clicking the <strong>Test</strong> button, you should receive a success message similar to the one below:</p>
<p><img class="alignnone size-full wp-image-1508" title="Connection test successful" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.28.05-PM.png" alt="Connection test successful" width="307" height="181" /></p>
<p>Repeat the steps above for the second database connection <strong>ds02</strong>. When you are done you should have both <strong>ds01</strong> and <strong>ds02</strong> database connections listed under the <strong>Database connections </strong>folder:</p>
<p><img class="alignnone size-full wp-image-1514" title="Database connections" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.41.25-PM.png" alt="Database connections" width="266" height="147" /></p>
<p>The last step is to share both the database connections so that they can be used throughout any other jobs and transformations which are created. <strong>Right click</strong> on the ds01 database connection and click the <strong>Share</strong> option:</p>
<p><img class="alignnone size-full wp-image-1511" title="Sharing database connections" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.38.08-PM.png" alt="Sharing database connections" width="242" height="204" /></p>
<p>Repeat the above step for ds02, you should now see both database connections in bold:</p>
<p><img class="alignnone size-full wp-image-1512" title="Shared database connections" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.40.04-PM.png" alt="Shared database connections" width="266" height="143" /></p>
<p>Now that the database connections have been created and shared <strong>save the Job</strong> and <strong>restart</strong> <strong>Kettle</strong>. In the following steps you will create the transformations.</p>
<p class="notice">It is important that you restart Kettle so that the shared database connections can be used within the transformations.</p>
<h3>Step 3. Create the Transformations.</h3>
<h4>1. Get employee details.</h4>
<p>The first transformation that you will need to create will require the following steps:</p>
<ol>
<li><strong>Get System Data</strong> : Get last month date</li>
<li><strong>Table input</strong> : Get employee data</li>
<li><strong>Copy rows to result</strong></li>
</ol>
<p>The first step is to create the Transformation, <strong>Get employee information.</strong> To create a new Transformation you  can either click on the <strong>File &gt; New &gt; Transformation</strong> option or use the <strong>CTRL + N</strong> shortcut.</p>
<p><img class="alignnone size-full wp-image-1516" title="New Transformation" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.52.43-PM.png" alt="New Transformation" width="235" height="57" /></p>
<p>Save the transformation and name it <strong>Get employee information</strong>.</p>
<p><strong><img class="alignnone size-full wp-image-1518" title="Get employee information saved" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.56.04-PM.png" alt="Get employee information saved" width="404" height="87" /></strong></p>
<p>The first step will retrieve last month&#8217;s date using the <strong>Get System Data</strong> step. Drag and drop the <strong>Get System Data </strong>(under Inputs) step from the left hand side onto the workspace and double click on it to edit the options. After making the changes the <strong>Get System Data</strong> step now look like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-9.07.14-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1564" title="Get System Data options" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-9.07.14-PM-300x173.png" alt="Get System Data options" width="300" height="173" /></a></p>
<p>After clicking the <strong>OK </strong>button the workspace now looks like this:</p>
<p><img class="alignnone size-full wp-image-1523" title="Get system data - workspace" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.04.59-AM.png" alt="Get system data - workspace" width="265" height="197" /></p>
<p>The next step, <strong>Get employee data</strong> uses a <strong>Table input </strong>(under Inputs)<strong> </strong>step which also utilises the previous steps (<strong>Get last month date</strong>) value as a variable in the WHERE clause. Drag and drop the <strong>Table input </strong>step from the left hand side pane onto the workspace and create a Hop between the <strong>Get last month date</strong> and the <strong>Table input </strong>step.</p>
<p class="notice">To create Hops click on the first step, hold down the SHIFT button and drag the arrow to next step.</p>
<p><img class="alignnone size-full wp-image-1524" title="Table input and hop created" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.15.54-AM.png" alt="Table input and hop created" width="283" height="195" /></p>
<p>Double click on the <strong>Table input</strong> step to change the options, after making the changes the options now look like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.40.07-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1578" title="Table input step options - Get employee data" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.40.07-PM-300x222.png" alt="Table input step options - Get employee data" width="300" height="222" /></a></p>
<ul>
<li><strong>Step name </strong>: Name of the step i.e. <strong>Get employee data</strong></li>
<li><strong>Connection</strong> : The connection which the step is using i.e. <strong>ds01</strong></li>
<li><strong>SQL </strong>: SQL statement used to retrieve the information, in this example we are retrieving employee codes who were created in the last month (which has been replaced with a ? to make it dynamic)</li>
<li><strong>Replace variables in script </strong>: Checked, we are using variables from the previous step which I have represented with a ? in the SQL statement</li>
<li><strong>Insert data from step</strong> : Selected the previous step, <strong>Get last month date </strong>as this contains the variable needed in the SQL statement</li>
</ul>
<p class="notice">You can read more into how to use variables in Table input steps on the <a href="http://wiki.pentaho.com/display/EAI/Table+Input" target="_blank">Pentaho Wiki</a>.</p>
<p>After clicking the <strong>OK </strong>button the workspace now looks like this:</p>
<p><img class="alignnone size-full wp-image-1527" title="Workspace after creating table input step" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.24.11-AM.png" alt="Workspace after creating table input step" width="316" height="186" /></p>
<p>You can make sure that the variable replacement is working you can preview the output of the <strong>Get employee data </strong>step by clicking on the step and then the <img class="alignnone size-full wp-image-1529" style="padding: 0; margin: 0; border: none;" title="Preview icon" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.26.30-AM.png" alt="Preview icon" width="20" height="23" /> preview (icon) or right clicking on the step and selecting the <strong>Preview</strong> option. This will open up a <strong>Transformation debug dialog </strong>window:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.28.28-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1530" title="Debug dialog" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.28.28-AM-300x141.png" alt="Debug dialog" width="300" height="141" /></a></p>
<p>Click the step which you would like to preview which in this example is <strong>Get employee data</strong> and click the<strong> Quick launch </strong>button, you should now be shown a preview of the data set from the <strong>Get employee data </strong>step:</p>
<p><img class="alignnone size-full wp-image-1532" title="Preview" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-12.31.23-AM.png" alt="Preview" width="340" height="187" /></p>
<p>The last step is a <strong>Copy rows from result</strong> step, this will copy the output from the previous step <strong>Get employee data</strong> to the result (memory). Drag and drop the <strong>Copy rows from result </strong>step (under Job) from the left hand side pane  on to the workspace and create a Hop between the <strong>Get employee data</strong> and the <strong>Get rows from result </strong>step.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-9.20.26-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1568" title="Copy rows to result options" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-9.20.26-PM-300x187.png" alt="Copy rows to result options" width="300" height="187" /></a></p>
<p>Save the transformation.<strong> </strong></p>
<h4>2. Get employee satisfaction.</h4>
<p>The second transformation you will need to create will require  the following steps:</p>
<ol>
<li><strong>Get rows from result</strong></li>
<li><strong>Table input </strong>: Get satisfaction data</li>
<li><strong>Excel output</strong></li>
</ol>
<p>The first step is to create the Transformation, <strong>Get employee  information.</strong> To create a new Transformation you  can either click on  the <strong>File &gt; New &gt; Transformation</strong> option or use the <strong>CTRL +  N</strong> shortcut.</p>
<p><img title="New  Transformation" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-08-at-11.52.43-PM.png" alt="New Transformation" width="235" height="57" /></p>
<p>Save the Transformation and name it <strong>Get employee satisfaction</strong>.</p>
<p><strong><img class="alignnone size-full wp-image-1544" title="Get employee satisfaction" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-7.55.43-PM.png" alt="Get employee satisfaction" width="371" height="67" /></strong></p>
<p>The first step will retrieve the data which is stored in the result (memory) by the <strong>Copy rows to result</strong> step in the previous transformation using the <strong>Get rows from result</strong> step. Drag and drop the <strong>Get rows from result </strong>(under Jobs)  step from the left hand side onto the workspace and double click on it  to edit the options. After making the changes to the <strong>Get rows from result</strong> step the options now look like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-8.02.36-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1548" title="Get rows from result options" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-8.02.36-PM-300x247.png" alt="Get rows from result options" width="300" height="247" /></a></p>
<p class="notice">Make sure you enter the exact name of the fields that you copied to the result which in this example was from the Table input step <strong>Get employee data</strong>, these were named <strong>emp_code</strong>.</p>
<p>The next step <strong>Get satisfaction data</strong> will be use <strong>Table input </strong>(under Scripts)<strong> </strong>step which will utilise the values of the previous step, <strong>Get rows from result</strong> in the WHERE clause. Drag and drop the <strong>Table input</strong> step from the left hand side pane onto the workspace and  create a Hop between the <strong>Get rows from result</strong> and the <strong>Table input </strong>step:</p>
<p><img class="alignnone size-full wp-image-1579" title="Get rows from result -&gt; Table input" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.41.50-PM.png" alt="Get rows from result -&gt; Table input" width="281" height="164" /></p>
<p>Double click on the <strong>Table input</strong> step to change the options, after  making the changes the options now look like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.45.57-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1581" title="Get satisfaction data" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.45.57-PM-300x226.png" alt="Get satisfaction data" width="300" height="226" /></a></p>
<ul>
<li><strong>Step name </strong>: Name of the step i.e. <strong>Get satisfaction data</strong></li>
<li><strong>Connection</strong> : The connection which the step is using i.e. <strong>ds02</strong></li>
<li><strong>SQL </strong>: SQL statement used to retrieve the information, in this  example we are retrieving employee satisfaction results for each employee code (which has been replaced with a ? to make it dynamic) stored in the result (memory) from the <strong>Get rows from result </strong>step</li>
<li><strong>Replace variables in script </strong>: Checked, we are using variables  from the previous step which I have represented with a ? in the SQL  statement</li>
<li><strong>Insert data from step</strong> : Selected the previous step, <strong>Get rows from result </strong>as this contains the variable needed in the SQL  statement</li>
<li><strong>Execute for each row?</strong> : Check, in this example we need to run this query for each row stored in the result (memory)</li>
</ul>
<p>Click <strong>OK </strong>your workspace will now look like this:</p>
<p><img class="alignnone size-full wp-image-1582" title="Get satisfcation data" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.49.46-PM.png" alt="Get satisfaction data" width="302" height="166" /></p>
<p>The last step is to create an <strong>Excel Output</strong> step which will store the results from the <strong>Get satisfaction data</strong> step. Drag and drop the <strong>Excel Output</strong> step from the left hand side pane onto the workspace and create a Hop between the <strong>Get satisfaction data </strong>and <strong>Excel Output </strong>step.</p>
<p><img class="alignnone size-full wp-image-1583" title="Excel output workspace" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.50.38-PM.png" alt="Excel output workspace" width="443" height="172" /></p>
<p>Double click on the <strong>Excel Output</strong> step to change  the options, after  making the changes the options now look  like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.52.22-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1584" title="Excel output options" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.52.22-PM-300x187.png" alt="Excel output options" width="300" height="187" /></a></p>
<ul>
<li><strong>File tab</strong>
<ul>
<li><strong>Filename</strong> : Name and location of where the Excel file will be stored<strong> </strong>i.e. <strong>/Users/prashantraju/Desktop/result</strong></li>
<li><strong>Extension</strong> : Extension of the file i.e. <strong>.xls</strong></li>
</ul>
</li>
<li><strong>Content tab</strong>
<ul>
<li><strong>Append</strong> : Append the results to the file, in this example the output will run for each row in the result (memory) so you will need to append the results to the file otherwise you will only see the last row from the ETL process</li>
<li><strong>Header </strong>: Include the header in the output, in this example that is <strong>emp_code, emp_name, question_title</strong> and <strong>response</strong></li>
</ul>
</li>
<li><strong>Fields tab</strong>
<ul>
<li>The fields which will be outputted into the Excel sheet, in this example it is only emp_code, question_title and response</li>
</ul>
</li>
</ul>
<p>Click <strong>OK </strong>to save the step and also save the Transformation.<strong> </strong></p>
<h3>Step 4. Complete the Job.</h3>
<p>The last and final step is to complete the Job which we created in Step 1, the job will require four steps:</p>
<ol>
<li><strong>START</strong></li>
<li><strong>Transformation: </strong>Get employee information</li>
<li><strong>Transformation: </strong>Get satisfaction information</li>
<li><strong>Success</strong></li>
</ol>
<p>Open the <strong>Process employee satisfaction</strong> job and drag and drop a <strong>START </strong>step (under General), two <strong>Transformation </strong>steps (under General) and a <strong>Success</strong> step (also under General) onto the workspace and create a Hop between each of them so that your workspace now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-8.42.37-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1556" title="Job workflow" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-8.42.37-PM-300x101.png" alt="Job workflow" width="300" height="101" /></a></p>
<p>You will need to make changes to both Transformation steps so that they point to the <strong>Get employee information</strong> and <strong>Get employee satisfaction</strong> transformations which were created in Step 3. Double click on the first transformation and change the options so that they now look like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-8.48.54-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1558" title="Get employee information - Transformation" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-8.48.54-PM-300x253.png" alt="Get employee information - Transformation " width="300" height="253" /></a></p>
<p>Click <strong>OK </strong>to save the step.</p>
<p>Repeat the above steps but for the <strong>Get employee satisfaction </strong>step.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-11.01.59-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1585" title="Get satisfaction information" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-11.01.59-PM-300x254.png" alt="Get satisfaction information" width="300" height="254" /></a></p>
<p>Click <strong>OK </strong>to save the step and also save the Job. Now you are ready to test the Job.</p>
<h3>Step 5. Test the Job.</h3>
<p>To run the ETL process make sure you have the <strong>Process employee satisfaction </strong>job open and click on the <img class="alignnone size-full wp-image-1575" style="padding: 0; margin: 0; border: none;" title="Run icon" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.14.53-PM.png" alt="Run icon" width="23" height="21" /> (run) icon to run the Job, this will display a <strong>Execute a job</strong> window after changing the options i.e. log detail etc:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.16.39-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1576" title="Execute a job" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-10.16.39-PM-287x300.png" alt="Execute a job" width="287" height="300" /></a></p>
<p>After clicking the <strong>Launch </strong>button and opening the <strong>result.xls</strong> file on my Desktop the output shows for each employee code the question and response:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-11.04.29-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1586" title="Excel output" src="http://www.prashantraju.com/wp-content/uploads/2010/06/Screen-shot-2010-06-11-at-11.04.29-PM-300x188.png" alt="Excel output" width="300" height="188" /></a></p>
<h3>Downloads.</h3>
<table>
<tbody>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Notes</th>
</tr>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_EMDI0YmUyZjctZDM1OC00ZGJlLTkyNzQtYWJlOTMyZTk5ZjJh&amp;hl=en">Process employee satisfaction</a></td>
<td>KJB</td>
<td>Released 11/06/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_ENDhmNmVmZWItOGU1Ni00ODM4LWExNjEtNjE2ZDc1NjA1ODNi&amp;hl=en">Get employee information</a></td>
<td>KTR</td>
<td>Released 11/06/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_EZDAwNzE4NGMtZGFjYy00Y2RlLTk1MTAtODA3OWE2NmQ5NzFk&amp;hl=en">Get employee satisfaction</a></td>
<td>KTR</td>
<td>Released 11/06/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_EYzc4MmNmMDYtOGNkMC00NDA3LTkxOTMtOTY4MzNiMjMxNmQy&amp;hl=en">SampleData</a></td>
<td>SQL</td>
<td>Released 11/06/2010</td>
</tr>
</tbody>
</table>
<h3>Final Notes.</h3>
<p>This example may not be the best way to represent the use of Table inputs and variables but hopefully the detail and the inclusion of storing rows in results, using system variables and debugging steps can help you with your PDI learning curve (not that that there is a big one anyway!).</p>
<p>As always, enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/06/using-variables-with-table-input-steps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Dynamic Sizing Charts with Pentaho Report Designer.</title>
		<link>http://www.prashantraju.com/2010/05/tip_creating-dynamic-sizing-charts-with-pentaho-report-designer/</link>
		<comments>http://www.prashantraju.com/2010/05/tip_creating-dynamic-sizing-charts-with-pentaho-report-designer/#comments</comments>
		<pubDate>Mon, 17 May 2010 09:30:23 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Report Designer]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1392</guid>
		<description><![CDATA[Pentaho Report Designer&#8217;s (PRD) charting capability is great &#8211; it has numerous charts to choose from and the formatting is extremely flexible. However I did have a problem with charts represent large data sets. For example I had a list of countries and a bar chart showing the population for each country, users were able [...]]]></description>
			<content:encoded><![CDATA[<p>Pentaho Report Designer&#8217;s (PRD) charting capability is great &#8211;  it has numerous charts to choose from and the formatting is extremely flexible. However I did have a problem with charts represent large data sets. For example I had a list of countries and a bar chart showing the population for each country, users were able to view one or more countries at a time using a multi value list parameter. The problem occurred when there were too many countries, the chart&#8217;s labels became unreadable. One method was to create a chart which had a dynamic width depending on the amount countries a user selected.</p>
<p><span id="more-1392"></span></p>
<h3>Scenario.</h3>
<p>I wanted to create a bar chart which has a dynamic width (<em>expand or <img title="More..." src="http://www.prashantraju.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" />contract</em>) depending on the amount of categories a user selected from a multi value list parameter. This would ensure that the chart didn&#8217;t become squashed and unreadable. in this tutorial I will be using a data set which represents population by countries.</p>
<h3>Data Set.</h3>
<p>Below is an example of the data set I will be using for this tutorial, as you can see each country has a population (you can download a spreadsheet version of the sample data at the end of this tutorial).</p>
<table>
<tbody>
<tr>
<th>ID</th>
<th>COUNTRY</th>
<th>POPULATION*</th>
</tr>
<tr>
<td>1</td>
<td>China</td>
<td>1337490000</td>
</tr>
<tr>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
</tr>
</tbody>
</table>
<p>* Population is calculated in the millions</p>
<h3>Step 1 &#8211; Data Source.</h3>
<p>Start PRD and create a new report. Right click on the <strong>Data Sets</strong> icon and select the <strong>JDBC</strong> option from the menu.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/datasource_jdbc_option.png" target="_blank"><img class="alignnone size-thumbnail wp-image-1350" title="Data Source &gt; JDBC option" src="http://www.prashantraju.com/wp-content/uploads/2010/05/datasource_jdbc_option-150x150.png" alt="Data Source, JDBC option" width="150" height="150" /></a></p>
<p>After selecting the <strong>JDBC</strong> option a <strong>JDBC Data Source</strong> window will appear. I have already created a connection to my database which includes the data that I will be working on, in this example it is called <strong>Geography</strong>.</p>
<p><img class="alignnone size-full wp-image-1424" title="Geography Data Source" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.05.57-AM.png" alt="Geography Data Source" width="266" height="175" /></p>
<p>Once you have a working connection to your database you are now ready to create your queries.</p>
<h3>Step 2 &#8211; Queries.</h3>
<p>This report contains two separate queries:</p>
<ol>
<li><strong>qCountries </strong>: Retrieves a distinct list of countries, this will be used for the countries parameter</li>
<li><strong>qDataset</strong> : Retrieves the population for the countries selected by a user</li>
</ol>
<h4>pCountries.</h4>
<p>The <strong>qCountries</strong> query needs to return a distinct list of countries<strong>, </strong>the SQL query looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>   <span style="color: #993333; font-weight: bold;">DISTINCT</span> COUNTRY
<span style="color: #993333; font-weight: bold;">FROM</span>     dataset</pre></div></div>

<p>A screen shot of the <strong>JDBC Data Source</strong> window of the <strong>qCountries</strong> query looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.03.56-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1423" title="qCountries" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.03.56-AM-300x211.png" alt="qCountries" width="300" height="211" /></a></p>
<h4>qDataset.</h4>
<p>The <strong>qDataset</strong> query needs to return the population for countries which the user has selected<strong>, </strong>the SQL query looks like this (this query will need to use a parameter which I will add in later):</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Use a sub query to calculate the total amount of countries selected</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>    t1<span style="color: #66cc66;">.</span>COUNTRY <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t1<span style="color: #66cc66;">.</span>POPULATION<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> POPULATION<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t2<span style="color: #66cc66;">.</span>COUNTRY_COUNT<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
<span style="color: #993333; font-weight: bold;">FROM</span>      dataset t1<span style="color: #66cc66;">,</span>
          <span style="color: #66cc66;">&#40;</span>
              <span style="color: #993333; font-weight: bold;">SELECT</span> COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
              <span style="color: #993333; font-weight: bold;">FROM</span> dataset
              <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY
          <span style="color: #66cc66;">&#41;</span> t2
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY</pre></div></div>

<p>A screen shot of the <strong>JDBC Data Source</strong> window with the <strong>qDataset</strong> query looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.17.37-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1468" title="qDataset" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.17.37-AM-300x213.png" alt="qDataset" width="300" height="213" /></a></p>
<h3>Step 3 &#8211; Parameter.</h3>
<p>There is only one (multi value list) parameter in this report which will display a distinct list of countries and be populated by the <strong>qCountries </strong>query. To create a new parameter right click on the <strong>Parameters </strong>option under the <strong>Data </strong>tab and click the <strong>Add Parameter&#8230; </strong>option:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.06.19-AM.png" target="_blank"><img class="alignnone size-full wp-image-1407" title="Add Parameter..." src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.06.19-AM.png" alt="Add Parameter..." width="220" height="248" /></a></p>
<p>This will bring up the <strong>Add Parameter</strong> window. After filling out all the options the <strong>Add Parameter</strong> window now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.13.43-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1409" title="sCountries" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.13.43-AM-292x300.png" alt="sCountries" width="292" height="300" /></a></p>
<p>Where the options and values are:</p>
<ul>
<li><strong>Name</strong> : This is the name of the parameter, this is used within report queries i.e. the WHERE clause of qDataset</li>
<li><strong>Label </strong>: The text which sits next to the parameter on the report i.e. <em>Select one or more countries</em></li>
<li><strong>Value Type </strong>: The data type of the sCountries value i.e. COUNTRY is a String</li>
<li><strong>Mandatory </strong>: For the report to run a parameter value must be selected i.e. Checked (true)</li>
<li><strong>Display Type </strong>: The parameter type i.e. Multi Value List</li>
<li><strong>Value </strong>: The parameters value which will used within queries etc. i.e. the field COUNTRY</li>
<li><strong>Display Name </strong>: What the user will see the parameter value as i.e. the field COUNTRY</li>
<li><strong>Visible items </strong>: The amount of items which are shown to the user in the multi value list parameter i.e. 3</li>
</ul>
<p>Click <strong>OK</strong> to save the parameter, it should now be visible under the <strong>Parameters item</strong> under the <strong>Data</strong> tab.</p>
<p><img class="alignnone size-full wp-image-1410" title="sCountries Parameter" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.21.48-AM.png" alt="sCountries Parameter" width="238" height="104" /></p>
<p>After adding the <strong>sCountries </strong>parameter the next step is to use the parameter as part of the <strong>qDataset</strong> WHERE clause. Right click on the <strong>qDataset</strong> item under the <strong>Data</strong> tab and click the <strong>Edit Query </strong>option:</p>
<p><img class="alignnone size-full wp-image-1427" title="Edit Query" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.57.41-AM.png" alt="Edit Query" width="235" height="172" /></p>
<p>Modify the <strong>qDataset</strong> query so that it now includes the <strong>sCountries</strong> parameter:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Use a sub query to calculate the total amount of countries selected</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>    t1<span style="color: #66cc66;">.</span>COUNTRY <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t1<span style="color: #66cc66;">.</span>POPULATION<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> POPULATION<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t2<span style="color: #66cc66;">.</span>COUNTRY_COUNT<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
<span style="color: #993333; font-weight: bold;">FROM</span>      dataset t1<span style="color: #66cc66;">,</span>
          <span style="color: #66cc66;">&#40;</span>
              <span style="color: #993333; font-weight: bold;">SELECT</span> COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
              <span style="color: #993333; font-weight: bold;">FROM</span> dataset
              <span style="color: #993333; font-weight: bold;">WHERE</span> COUNTRY <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#123;</span>sCountries<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>
              <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY
          <span style="color: #66cc66;">&#41;</span> t2
<span style="color: #993333; font-weight: bold;">WHERE</span> COUNTRY <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#123;</span>sCountries<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY</pre></div></div>

<p><a href="../wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.14.17-AM.png" target="_blank"><img title="qDataset" src="../wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.14.17-AM-300x223.png" alt="qDataset" width="300" height="223" /></a></p>
<h3>Step 4 &#8211; Bar Chart.</h3>
<p>The next step is to create a bar chart whose width is dynamic based on the amount of countries a user selects. To get started drag and drop the chart object onto the report header.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.27.11-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1413" title="Bar Chart on Report Header" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.27.11-AM-300x187.png" alt="Bar Chart on Report Header" width="300" height="187" /></a></p>
<p>As you can see the width is fixed at the moment but before I start to make any changes to the chart&#8217;s width I will need to configure my chart to display our data and see how it becomes unreadable when we increase the amount of categories on the x axis. Double click on the chart and to bring up the <strong>Edit Chart </strong>window.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.29.34-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1414" title="Edit Chart" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.29.34-AM-300x199.png" alt="Edit Chart" width="300" height="199" /></a></p>
<p>By default the chart is set to a bar chart and without going through every available option I made the following changes to represent my data set:</p>
<ul>
<li><strong>chart-title</strong> : Chart title i.e. Population of Countries (optional)</li>
<li><strong>gridlines</strong> : Are the vertical and horizontal grid markers i.e. Set to False (optional)</li>
<li><strong>x-axis</strong><strong>-title</strong> : Label of the x-axis i.e Countries</li>
<li><strong>x-axis</strong><strong>-label-rotation<strong> </strong></strong>: Rotation of the x-axis label i.e. 90</li>
<li><strong>y-axis</strong><strong>-title</strong> : Label of the y-axis i.e. Population (millions)</li>
<li><strong>category-column</strong><strong> </strong>: Field which will be on the x-axis i.e. COUNTRY</li>
<li><strong>value-columns</strong><strong> </strong> : Field which populates the y-axis i.e. POPULATION</li>
<li><strong>series-by-field</strong> : Field which defines the series i.e. COUNTRY</li>
</ul>
<p>After previewing the chart with all the countries selected you can see that the output is squashed and unreadable.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-12.30.08-PM1.png" target="_blank"><img class="alignnone size-medium wp-image-1433" title="Preview Non Dynamic Chart" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-12.30.08-PM1-300x127.png" alt="Preview Non Dynamic Chart" width="300" height="127" /></a></p>
<p>One way around this is to make the width (or height) of your chart dynamic by the amount of countries the user selects from the multi value list parameter. Select the chart and on the right hand side under the <strong>Style</strong> tab locate the <strong>size &amp; position </strong>option and click the <img class="alignnone size-full wp-image-688" style="padding: 0; margin: 0; border: none;" title="Plus Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/01/plus_icon.jpg" alt="Add a new query icon" width="15" height="15" /> icon under the <strong>Formula</strong> column. This will display an <strong>Expression </strong>window, click on the <img class="alignnone size-full wp-image-1434" style="padding: 0; margin: 0; border: none;" title="Screen shot 2010-05-15 at 1.35.05 PM" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.35.05-PM.png" alt="" width="32" height="20" /> icon which will then open the <strong>Formula Editor</strong> window.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.37.51-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1436" title="Formula Editor" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.37.51-PM-300x169.png" alt="Formula Editor" width="300" height="169" /></a></p>
<p>The formula below retrieves the COUNTRY_COUNT field and multiplies it by the width of the chart which suits one category (country) on the x axis, which in this example is 150.</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># If there is only one country selected then use default width otherwise calculate width</span>
<span style="color: #000000;">=</span>IF<span style="">&#40;</span><span style="">&#91;</span>COUNTRY_COUNT<span style="">&#93;</span><span style="color: #000000;">=</span><span style="">1</span>;<span style="">150</span>;<span style="">&#91;</span>COUNTRY_COUNT<span style="">&#93;</span>*<span style="">150</span><span style="">&#41;</span></pre></div></div>

<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-9.20.29-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1449" title="Width Formula" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-9.20.29-PM-300x177.png" alt="Width Formula" width="300" height="177" /></a></p>
<p>Save the formula. Now you are ready to preview the report.</p>
<h3>Step 5 &#8211; Preview.</h3>
<p>Click on the preview icon <img class="alignnone size-full wp-image-723" style="padding: 0px; margin: 0px; border: none;" title="Preview Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/01/preview_icon.jpg" alt="Preview icon" width="26" height="26" /> and select one country from the multi value list parameter, as you can see the width is set to our default width, 150.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.17-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1457" title="1 Parameter" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.17-PM-300x137.png" alt="1 Parameter" width="300" height="137" /></a></p>
<p>Selecting two countries from the multi value list parameter will expand the width to 300.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.37-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1458" title="2 Parameters" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.37-PM-300x135.png" alt="2 Parameters" width="300" height="135" /></a></p>
<p>Selecting four countries from the multi list parameter will expand the width to 600.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.52.34-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1459" title="4 Parameters" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.52.34-PM-300x136.png" alt="4 Parameters" width="300" height="136" /></a></p>
<p>So that is how you create a chart which can expand or contract depending on the amount of categories displayed on the x axis.</p>
<h3>Downloads.</h3>
<table>
<tbody>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Notes</th>
</tr>
<tr>
<td><a href="http://docs.google.com/leaf?id=0B9Jmocc0fj_EYjg1MTM2YTEtYzhjZi00N2Y1LTg5YmQtNTg2ZWU0Mjg3Zjhl&amp;hl=en" target="_blank">DynamicChartsData</a></td>
<td>ODS</td>
<td>Released 17/05/2010</td>
</tr>
<tr>
<td><a href="http://docs.google.com/leaf?id=0B9Jmocc0fj_EOGMxMjRhZmYtOGIzMS00NmNlLTgzNjAtMTNlNWZiMGE0MDcz&amp;hl=en" target="_blank">DynamicCharts</a></td>
<td>PRPT</td>
<td>Released 17/05/2010</td>
</tr>
</tbody>
</table>
<h3>Final Notes.</h3>
<p>A couple of things to note about the method I used:</p>
<ul>
<li>The query to generate the amount of selected countries uses a sub query and could cause performance issues with large data sets etc.</li>
<li>This method can be used for both the width and height and on any other object within PRD i.e. shapes, labels, pictures etc.</li>
</ul>
<p>Hopefully this comes in handy when you start handling large data sets and charts!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/05/tip_creating-dynamic-sizing-charts-with-pentaho-report-designer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tip: Displaying Multi Parameter Values with Pentaho Report Designer.</title>
		<link>http://www.prashantraju.com/2010/04/displaying-multi-parameter-values-with-pentaho-report-designer/</link>
		<comments>http://www.prashantraju.com/2010/04/displaying-multi-parameter-values-with-pentaho-report-designer/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:14:52 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Report Designer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1240</guid>
		<description><![CDATA[Multi list parameters (multi list values and multi selection buttons) are a great way of letting a user filter a report on one or more values at once. Recently I came across a situation where I had to display these values in a friendly format. This tip will outline a method I used to display [...]]]></description>
			<content:encoded><![CDATA[<p>Multi list parameters (multi list values and multi selection buttons) are a great way of letting a user filter a report on one or more values at once. Recently I came across a situation where I had to display these values in a friendly format. This tip will outline a method I used to display friendly formatted parameter values of a multi list parameter inside a report using Pentaho Report Designer 3.6.</p>
<p><span id="more-1240"></span></p>
<p>My current report (based on the Steel Wheels sample data) displays the product code and product name based on multiple selections of product codes using a multi value list parameter type:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-9.55.06-PM.png"><img class="alignnone size-medium wp-image-1247" title="Pentaho Report Designer Preview" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-9.55.06-PM-300x151.png" alt="Pentaho Report Designer Preview" width="300" height="151" /></a></p>
<p>To populate the above report I use the following queries:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Name: product</span>
<span style="color: #808080; font-style: italic;">-- Description: Populates the main report</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>
  PRODUCTCODE<span style="color: #66cc66;">,</span> PRODUCTNAME
<span style="color: #993333; font-weight: bold;">FROM</span>
  PRODUCTS
<span style="color: #993333; font-weight: bold;">WHERE</span>
  PRODUCTCODE <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#123;</span>productCodes<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- Name: productsList</span>
<span style="color: #808080; font-style: italic;">-- Description: Populates the product code parameter</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>
  <span style="color: #993333; font-weight: bold;">DISTINCT</span> PRODUCTCODE
<span style="color: #993333; font-weight: bold;">FROM</span>
  PRODUCTS</pre></div></div>

<p>The options for the product code multi value list parameter are:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-9.44.59-PM.png"><img class="alignnone size-medium wp-image-1246" title="Parameter Options" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-9.44.59-PM-284x300.png" alt="Parameter Options" width="284" height="300" /></a></p>
<p>Now I need to display the multi list parameter values (product codes) in the report header but formatted like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">S10_1678, S10_1949, S10_2016</pre></div></div>

<p>To create the above format I&#8217;m going to use MySQL&#8217;s <strong>GROUP_CONCAT</strong> function (there are similar functions out there for PostgreSQL, Oracle, SQL Server etc.) in a new query. The query which uses the GROUP_CONCAT function looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Name: productsSelected</span>
<span style="color: #808080; font-style: italic;">-- Description: Displays a friendly formatted list of parameters inside the sub-report using the productCodes parameter</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">SELECT</span>
  GROUP_CONCAT<span style="color: #66cc66;">&#40;</span>PRODUCTCODE<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">', '</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">FROM</span>
  PRODUCTS
<span style="color: #993333; font-weight: bold;">WHERE</span>
  PRODUCTCODE <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>$productCodes<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>As this is a separate query I will need to create an <strong>inline</strong> sub-report. The first step is to drag and drop the sub-report object from the left pane onto the report-header and assign the <strong>productsSelected</strong> query:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.35.09-PM.png"><img class="alignnone size-medium wp-image-1257" title="Assigned the productSelected query to the sub-report" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.35.09-PM-300x193.png" alt="Assigned the productSelected query to the sub-report" width="300" height="193" /></a></p>
<p>The next step is to double click on the sub-report to work inside it. Once the sub-report has opened under the <strong>Data</strong> tab right click on the <strong>Parameters</strong> item and select the <strong>Edit Sub-report Parameters&#8230;</strong> option. From the <strong>Sub-report parameters</strong> window add in the productCode parameter under the <strong>Import Parameters</strong> area (Outer and Inner) and click <strong>OK</strong> to save.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.39.24-PM.png"><img class="alignnone size-medium wp-image-1258" title="Sub-report Parameters Window" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.39.24-PM-300x176.png" alt="Sub-report Parameters Window" width="300" height="176" /></a></p>
<p>To display the multi value list field (GROUP_CONCAT(PRODUCTCODE, &#8216;, &#8216;)), I dragged and dropped the field from the <strong>productsSelected</strong> query under the <strong>Data</strong> tab onto the report header section and also added a label <em>Selected Product Codes</em>:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.43.18-PM.png"><img class="alignnone size-medium wp-image-1260" title="Report Header with Parameter Values" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.43.18-PM-300x99.png" alt="Report Header with Parameter Values" width="300" height="99" /></a></p>
<p>After the previewing the report I can now see that the parameters from the multi value list are displayed in a friendly format:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.45.29-PM.png"><img class="alignnone size-medium wp-image-1261" title="Preview" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-14-at-10.45.29-PM-300x201.png" alt="Preview" width="300" height="201" /></a></p>
<p>This method does have a downfall as it runs another query but it is a simple and clean way of outputting the values of multi value list parameters.</p>
<table>
<thead>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_EYTBkZTFmNjgtMGNjZS00MzliLWJhYzctM2RlM2YwZmJjZDk5&amp;hl=en" target="_blank">MultiValueListParameters</a></td>
<td>PRPT</td>
<td>Released 14/04/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/fileview?id=0B9Jmocc0fj_EZDA2MTY4YWYtOGY2OC00YzVkLWIzM2YtMGEwMTM5OGE0NDI0&amp;hl=en" target="_blank">MultiValueListParametersPreview</a></td>
<td>PDF</td>
<td>Released 14/04/2010</td>
</tr>
</tbody>
</table>
<p>Do you use a different method? Let me know by posting a comment!</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/04/displaying-multi-parameter-values-with-pentaho-report-designer/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Pentaho Report Designer and Excel Data Sources.</title>
		<link>http://www.prashantraju.com/2010/04/pentaho-report-designer-and-excel-data-sources/</link>
		<comments>http://www.prashantraju.com/2010/04/pentaho-report-designer-and-excel-data-sources/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 03:23:57 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Report Designer]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1097</guid>
		<description><![CDATA[Last week I had a regular Excel/Access user approach me with a problem: I have 40 sale campaigns. I need to put together a quick presentation (as a PDF) which will show 2 key metrics (New and Loss revenue) for each of the 40 sale campaigns. Do you know of a quick way I can [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I had a regular Excel/Access user approach me with a problem:</p>
<blockquote><p>I have 40 sale campaigns. I need to put together a quick presentation (as a PDF) which will show 2 key metrics (New and Loss revenue) for each of the 40 sale campaigns. Do you know of a quick way I can produce this presentation?</p></blockquote>
<p>I thought this would the perfect opportunity to show off Pentaho Report Designer (PRD) as an alternative to Mircosoft Excel, Access or other big BI vendors. Below is a step by step guide on how I accomplished this.</p>
<p><span id="more-1097"></span></p>
<h3>Scenario.</h3>
<p>The above statement sums up the users requirements, visually the the report needed to look like this:</p>
<p><img class="alignnone size-full wp-image-1167" title="Report Structure" src="http://www.prashantraju.com/wp-content/uploads/2010/04/report_structure1.jpg" alt="Report Structure" width="311" height="190" /></p>
<p>After I knew the structure of the report I got the user to export the data into an Excel Worksheet &#8211; this was going to be my data source &#8211; after this it took me only 5 minutes to create the presentation using PRD.</p>
<h3>Data Source.</h3>
<p>The end user was able to produce a raw extract of the data which the report needed to be based on. Here is a preview of the data:</p>
<table>
<thead>
<tr>
<th>Campaign</th>
<th>Week_Ending</th>
<th>New_09</th>
<th>New_10</th>
<th>Loss_09</th>
<th>Loss_10</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>04/04/2010</td>
<td>12313</td>
<td>23423</td>
<td>34534</td>
<td>3463</td>
</tr>
<tr>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
</tr>
</tbody>
</table>
<ul>
<li><strong>Campaign</strong>: Campaign identifier which duplicates for each week row</li>
<li><strong>Week</strong>: Week ending date which is for 2010</li>
<li><strong>New_09, Loss_09:</strong> Revenue for 2009</li>
<li><strong>New_10, Loss_10</strong>: Revenue for 2010</li>
</ul>
<p>To use an Excel worksheet as a data source make sure the <strong>Data</strong> tab is active, right click on the <strong>Data Sets</strong> icon and select the <strong>Table</strong> option:</p>
<p><img class="alignnone size-full wp-image-1153" title="Table Data Source" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource.jpg" alt="Table Data Source (Data &gt; Data Sets &gt; Table)" width="285" height="269" /></p>
<p>After clicking the <strong>Table</strong> option a <strong>Table Datasource Editor</strong> window is displayed:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor.jpg"><img class="alignnone size-medium wp-image-1154" title="Table Datasource Editor" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor-300x282.jpg" alt="Table Datasource Editor Window" width="300" height="282" /></a></p>
<h4><strong>Step 1. Create a Query.</strong></h4>
<p>The first step is to create a query which will store the data set. Click on the <img class="alignnone size-full wp-image-688" title="Plus Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/01/plus_icon.jpg" alt="Add a new query icon" width="15" height="15" /> (Add Query) icon and then specify a name, in this example I&#8217;m naming the query <strong>dataset</strong>.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_New.jpg"><img class="alignnone size-medium wp-image-1155" title="Table Datasource Editor New Query" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_New-300x282.jpg" alt="Table Datasource Editor New Query" width="300" height="282" /></a></p>
<h4><strong>Step 2. Select the Excel Worksheet.</strong></h4>
<p>The next step is to select the Excel worksheet which contains the data set. Click on  the <img class="alignnone size-full wp-image-1127" title="Table Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-11.04.45-PM.png" alt="Table Icon" width="44" height="38" /> icon located in the bottom left hand corner to open up a file browser window, select the Excel file which contains the data set and click <strong>OK</strong>. Your data set should now be visible (as my Excel worksheet has headers I have checked the <strong>Use First Row as  Header</strong> option).</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Pre.jpg"><img class="alignnone size-medium wp-image-1156" title="Table Datasource Editor Preview Data" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Pre-300x282.jpg" alt="Table Datasource Editor Preview Data" width="300" height="282" /></a></p>
<p class="notice">At the moment you can only use .XLS files so if you are using Office 2007+ make sure you save the extension as .XLS instead of .XLSX <strong>and </strong>if your .XLS file contains formulas they will not be recognised by PRD so be sure to paste special as values.</p>
<h4><strong><strong>Step 3. Manipulate the Data.</strong></strong></h4>
<p>You can add empty rows and columns or remove rows and columns by using these icons:</p>
<p><img class="alignnone size-full wp-image-1157" title="Modify the Dataset" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Edi.jpg" alt="Modify the Dataset" width="322" height="45" /></p>
<p>You are also able to change the column headers and data type by double clicking on the column header:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Col.jpg"><img class="alignnone size-medium wp-image-1158" title="Table Datasource Editor - Modify Column Data Types and Names" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Col-300x282.jpg" alt="Table Datasource Editor - Modify Column Data Types and Names" width="300" height="282" /></a></p>
<p class="notice">In this example I didn&#8217;t need to make any modifications to the data however I did have trouble converting the Week_Ending field into a date format so in the Excel worksheet I converted it into a string using the TEXT() function &#8211; if anyone knows how to get this working please lleave a comment.</p>
<p>Once you are happy with the data set click the <strong>OK</strong> button. The data set should now be visible as fields under the <strong>Data Sets</strong> &gt; <strong>Table &gt; dataset</strong> icon under the <strong>Data</strong> tab:</p>
<p><img class="alignnone size-full wp-image-1159" title="Data Sets Fields" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Data_Sets_Fields.jpg" alt="Data Sets Fields" width="314" height="210" /></p>
<h3>Building the Report.</h3>
<p>The next step was to build the report, from the report structure (above) I knew I had to create one group Campaign, and within that group add 2 charts which represented the New and Loss Revenue for 2009 and 2010.</p>
<h4><strong>Step 1. Add the Group.</strong></h4>
<p>To get started add the <strong>Campaign</strong> field as a group by right clicking on the <strong>Groups</strong> item under the <strong>Structure</strong> tab and selecting the <strong>Edit Group</strong> .. option:</p>
<p><img class="alignnone size-full wp-image-1160" title="Edit Group Option" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Edit_Group.jpg" alt="Edit Group Option" width="314" height="210" /></p>
<p>After clicking the <strong>Edit Group ..</strong> option an <strong>Add Group </strong>window will appear, specify a name for the group i.e. Campaign and using the arrows move the field over which defines the group which in this example is Campaign and click <strong>OK</strong> when done.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Group.jpg"><img class="alignnone size-medium wp-image-1161" title="Add Group Window" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Group-300x150.jpg" alt="Add Group Window" width="300" height="150" /></a></p>
<p>The Campaign field will now be defined under the <strong>Attributes</strong> tab for the <strong>Group</strong> <strong>item</strong>:</p>
<p><img class="alignnone size-full wp-image-1162" title="Campaign Group Attributes" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Campaign_Group_Attr.jpg" alt="Campaign Group Attributes" width="314" height="210" /></p>
<p>The next step is to make the <strong>Group Header </strong>and <strong>Details Header </strong>are visible on the report canvass. Click on the <strong>Groups</strong> &gt; <strong>Group</strong> <strong>Header</strong> item under the <strong>Structure</strong> tab and and under the <strong>Attributes</strong> tab uncheck the <strong>hide-on-canvass</strong> option:</p>
<p><img class="alignnone size-full wp-image-1163" title="Group Header Visible" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Group_Header_Visible.jpg" alt="Group Header Visible" width="314" height="210" /></p>
<p>Repeat the above steps for the <strong>Groups &gt; Details Body &gt; Details Header </strong>item as well:</p>
<p><img class="alignnone size-full wp-image-1164" title="Details Header Visible" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Details_Header_Visible.jpg" alt="Details Header Visible" width="314" height="210" /></p>
<h4><strong><strong>Step 2. Functions.</strong></strong></h4>
<p>I will need to create three functions; one which will convert the Week_Ending field into a date and the other two will be display dynamic chart titles.</p>
<h5><strong>Converting the Date.</strong></h5>
<p>As I mentioned above I had some issues with letting PRD convert the Week_Ending field into a date from the Table Datasource Editor, so to get around this I created a formula which would take the Week_Ending field (as a string) and convert it into a Date.</p>
<p>To do this create a new function by right clicking on the <strong>Functions </strong>option under the <strong>Data</strong> tab and click the <strong>Add Function&#8230;</strong> option.</p>
<p><img class="alignnone size-full wp-image-1168" title="Add Function Menu Option" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Fucntion_Option.jpg" alt="Add Function Menu Option" width="314" height="210" /></p>
<p>From the<strong> Add Function&#8230;</strong> window expand the<strong> Common</strong> folder and select the<strong> Open Formula</strong> option and click the <strong>Add </strong>button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Function_Open_Form.jpg"><img class="alignnone size-medium wp-image-1169" title="Add Function Open Formula" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Function_Open_Form-300x154.jpg" alt="Add Function Open Formula" width="300" height="154" /></a></p>
<p>This will add an <strong>Open Formula</strong> function under the <strong>Functions </strong>option (seen under the <strong>Data</strong> tab) :</p>
<p><img class="alignnone size-full wp-image-1170" title="New Open Formula Created" src="http://www.prashantraju.com/wp-content/uploads/2010/04/New_Open_Formula_Created.jpg" alt="New Open Formula Created" width="314" height="210" /></p>
<p>To change the name of the function (named by default as FormulaExpression1) click on the function and in the area below change the value that is set for the <strong>Function Name</strong>, in this example I named the function New_Week_Ending:</p>
<p><img class="alignnone size-full wp-image-1171" title="New Function Name" src="http://www.prashantraju.com/wp-content/uploads/2010/04/New_Function_Name.jpg" alt="New Function Name" width="314" height="210" /></p>
<p>To edit the formula of the function click on the <img class="alignnone size-full wp-image-1172" title="Dot Dot Dot" src="http://www.prashantraju.com/wp-content/uploads/2010/04/dotdotdot.jpg" alt="Dot Dot Dot" width="19" height="15" /> icon which is displayed when you click in the <strong>Formula </strong>value area, this will display a <strong>Formula Editor</strong> window:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor.jpg"><img class="alignnone size-medium wp-image-1173" title="Formula Editor Window" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor-300x136.jpg" alt="Formula Editor Window" width="300" height="136" /></a></p>
<p>As my date is in the current format YYYY-MM-DD I needed to use the DATE function with a combination of LEFT, MID and RIGHT functions to convert it into a date. I won&#8217;t go into too much detail with this section as all these functions are pretty self explanatory and are well documented in the Formula Editor but the final formula looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">=DATE(LEFT([Week_Ending];4);MID([Week_Ending];6;2);RIGHT([Week_Ending];2))</pre></div></div>

<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor_Window.jpg"><img class="alignnone size-medium wp-image-1175" title="Date Formula inside Formula Editor" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor_Window-300x182.jpg" alt="Date Formula inside Formula Editor" width="300" height="182" /></a></p>
<p>Click the <strong>OK </strong>button to save the New_Week_Ending formula. I have just created a function which will convert the Week_Ending (string) field into a New_Week_Ending (date) field so that the X-Y Chart TimeSeries Collector will now recognise it as a date.</p>
<h5><strong><strong>Dynamic Chart Titles.</strong></strong></h5>
<p>Each chart needs to have a dynamic title which will output the campaign and the measure which is represented i.e. 1 &#8211; New Revenue ($). As I have two charts for each campaign I will need to create two functions: one for the New Revenue chart and one for the Loss Revenue chart.</p>
<p>Following the steps outlined above to create two new functions (with the names sNewChart and sLossChart) using the <strong>Open Formula</strong> type and specify the formulas to be:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># New Revenue Charts (sNewChart)</span>
<span style="color: #000000;">=</span><span style="">&#91;</span>Campaign<span style="">&#93;</span> &amp; <span style="color: #933;">&quot; - New Revenue ($)&quot;</span>
<span style="color: #808080; font-style: italic;"># Loss Revenue Charts (sLossChart)</span>
<span style="color: #000000;">=</span><span style="">&#91;</span>Campaign<span style="">&#93;</span> &amp; <span style="color: #933;">&quot; - Loss Revenue ($)&quot;</span></pre></div></div>

<p>I have now created three functions:</p>
<p><img class="alignnone size-full wp-image-1183" title="Three New Functions" src="http://www.prashantraju.com/wp-content/uploads/2010/04/three_new_func.jpg" alt="Three New Functions" width="314" height="210" /></p>
<h4><strong>Step 2. Add the Group Header.</strong></h4>
<p>To add the Campaign as the Group Header drag and drop the <strong>Campaign</strong> field from the <strong>Data </strong>tab onto the <strong>Group Header</strong> area and apply some formatting:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Group_Header_Campaign.jpg"><img class="alignnone size-medium wp-image-1176" title="Group Header with Campaign " src="http://www.prashantraju.com/wp-content/uploads/2010/04/Group_Header_Campaign-300x206.jpg" alt="Group Header with Campaign " width="300" height="206" /></a></p>
<h4><strong><strong>Step 3. Add the Charts.</strong></strong></h4>
<p>Each chart needed to look similar to this mockup (I have already created the Chart Title and New_Week_Ending functions):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_structure1.jpg"><img class="alignnone size-full wp-image-1182" title="Chart Structure" src="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_structure1.jpg" alt="Chart Structure" width="383" height="300" /></a></p>
<p>Drag and drop a chart object <a href="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_icon.jpg"><img title="Chart Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_icon.jpg" alt="Chart Icon" width="22" height="18" /></a> from the panel located on the left hand side onto the <strong>Details Header</strong> section and double click the object to open up the<strong> Edit Chart</strong> (properties) window . To create a<strong> X-Y Chart </strong>which uses a <strong>TimeSeries Collector</strong> make sure you <strong>Edit Chart</strong> (properties) window looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Edit_Chart_Properties.jpg"><img class="alignnone size-medium wp-image-1181" title="Edit Chart Properties" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Edit_Chart_Properties-300x155.jpg" alt="Edit Chart Properties" width="300" height="155" /></a></p>
<p>After setting up all the options the <strong>Edit Chart</strong> (properties) window now look like this (for the New Revenue measure):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Chart_Prop_Setup.jpg"><img class="alignnone size-medium wp-image-1185" title="Chart Properties for New Revenue Measure" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Chart_Prop_Setup-300x207.jpg" alt="Chart Properties for New Revenue Measure" width="300" height="207" /></a></p>
<ul>
<li><strong>Title</strong>
<ul>
<li><strong>chart-title-field:</strong> Field or function which is the chart title i.e. sNewChart or sLossChart</li>
</ul>
</li>
<li><strong>Primary DataSource</strong>
<ul>
<li><strong>Common<br />
</strong></p>
<ul>
<li><strong>category-time-option</strong>: Value of the x-axis, this must match the amount of series you have in the value-column option i.e. New_Week_Ending (twice)</li>
<li><strong>time-period-type</strong>: Type of period the above field is i.e. Week and New_Week_Ending is an increment of weeks</li>
<li><strong>value-column</strong>: Field(s) which contain the y-axis, you can specify more than one as there can be multiple series i.e. New_09 and New_10 or Loss_09 and Loss_10</li>
</ul>
</li>
<li><strong>Series</strong>
<ul>
<li><strong>series-by-value:</strong> Name of the each series specified for the above option i.e. 2009 and 2010</li>
</ul>
</li>
<li><strong>Group</strong>
<ul>
<li><strong>reset-group:</strong> Reset the charts after a specific group(s) i.e. Campaign</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>There was alot of extra formatting on the charts so be sure to check out the available .PRPT file if you interested in what they look like.</p>
<p>After I created the chart for New Revenue I just copied and pasted the chart object and made changes to the properties to create the Loss Revenue chart:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Loss_revenue_chart_prop.jpg"><img class="alignnone size-medium wp-image-1188" title="Loss Revenue Chart Properties" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Loss_revenue_chart_prop-300x207.jpg" alt="Loss Revenue Chart Properties" width="300" height="207" /></a></p>
<p>The final report structure looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/report_structure_complete.jpg"><img class="alignnone size-medium wp-image-1189" title="Report Structure Complete" src="http://www.prashantraju.com/wp-content/uploads/2010/04/report_structure_complete-300x182.jpg" alt="Report Structure Complete" width="300" height="182" /></a></p>
<p class="success">There are a lot of options in the charting library of PRD so I suggest you pick up Will Gorman&#8217;s book <a href="http://www.amazon.com/gp/product/1847193196/ref=oss_product" target="_blank">Pentaho Reporting 3.5 for Java Developers</a> which has a couple of chapters which cover the charting library in detail.</p>
<h4><strong><strong><strong><strong>Step 4. Add the Page Break.</strong></strong></strong></strong></h4>
<p>The last step was to add a page break after each Campaign group. To do this click on the <strong>Details Body</strong> item under the <strong>Structure </strong>tab and check the <strong>pagebreak-after </strong>option:</p>
<p><img class="alignnone size-full wp-image-1191" title="Page Break" src="http://www.prashantraju.com/wp-content/uploads/2010/04/page_break.jpg" alt="Page Break" width="314" height="210" /></p>
<h3>Output.</h3>
<p>After previewing the report the final output as a PDF looks like this (you can download the actual PDF file below):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/preview.jpg"><img class="alignnone size-medium wp-image-1194" title="Preview" src="http://www.prashantraju.com/wp-content/uploads/2010/04/preview-300x241.jpg" alt="Preview" width="300" height="241" /></a></p>
<h3>Downloads.</h3>
<table>
<thead>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_EM2QzYTc5ZWYtYTIwMC00Mjk3LTkzNTYtZmVlMjZjNzkxNDUx&amp;hl=en" target="_blank">ExcelDataSource</a></td>
<td>PRPT</td>
<td>Released 8/04/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/fileview?id=0B9Jmocc0fj_EODdmMmEyMzItZWEwNS00MzgxLWI4M2QtN2Y5NmQwYWZhZTlh&amp;hl=en" target="_blank">ExcelDataSourceSampleData</a></td>
<td>XLS</td>
<td>Released 8/04/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/fileview?id=0B9Jmocc0fj_EYjUzYjZkZWYtNTVjOS00OGU5LWE1ZjYtNjJkOTkyNmVkODYw&amp;hl=en" target="_blank">ExcelDataSourcePreview</a></td>
<td>PDF</td>
<td>Released 8/04/2010</td>
</tr>
</tbody>
</table>
<h3>Final Notes.</h3>
<p>This post is very detailed as it covers some interesting areas but as this was an ad hoc request it took me under 5 minutes to whip together this report and have it in the user&#8217;s inbox. Do you have any examples of how you handled ad hoc requests with PRD? If so, leave a comment or send me an <a href="mailto:prashant.g.raju@gmail.com">email</a>.</p>
<p>One user converted <em>n</em> to go! Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/04/pentaho-report-designer-and-excel-data-sources/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Customising the Pentaho User Console &#8211; Part 4.</title>
		<link>http://www.prashantraju.com/2010/03/customising-the-pentaho-user-console-part-4/</link>
		<comments>http://www.prashantraju.com/2010/03/customising-the-pentaho-user-console-part-4/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 05:56:24 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[BI Server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[User Console]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1055</guid>
		<description><![CDATA[This post is part 4 of the series “Customising the Pentaho User Console (PUC)” Version 3.5.x. Here is a list of what I have covered in other parts: Login page and dialog Messages Main toolbar, menu bar and logo panel Launch page (covered in this post) In this post I will show you how to [...]]]></description>
			<content:encoded><![CDATA[<p>This post is part 4 of the series “Customising the Pentaho User Console (PUC)” Version 3.5.x. Here is a list of what I have covered in other parts:</p>
<ul>
<li><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-1/">Login page and dialog</a></li>
<li><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-2/">Messages</a></li>
<li><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-3/">Main toolbar, menu bar and logo panel</a></li>
<li><strong><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-4/">Launch page (covered in this post)</a></strong></li>
</ul>
<p><strong>In this post I will show you how to customise the launch page.</strong></p>
<p><span id="more-1055"></span></p>
<h3>The Launch Page</h3>
<p>The launch page is the default page that is displayed when you log into the PUC, below is a screenshot of the launch page:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/1_Launch_Page.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/1_Launch_Page-300x243.jpg" alt="What Is The Launch Page" title="Launch Page" width="300" height="243" class="alignnone size-medium wp-image-1056" /></a></p>
<h3>launch.jsp</h3>
<p>The contents of the launch page are generated by the <span class="inline-pre">launch.jsp</span> file which is located under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/launch/</span> directory, the images which are used for the launch page are located under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/launch/images</span> directory.</p>
<p>The contents of the <span class="inline-pre">launch.jsp</span> are:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>@ taglib prefix<span style="color: #339933;">=</span><span style="color: #0000ff;">'c'</span> uri<span style="color: #339933;">=</span><span style="color: #0000ff;">'http://java.sun.com/jstl/core'</span><span style="color: #339933;">%&gt;&lt;%</span>@
    page
  language<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;java&quot;</span>
  <span style="color: #000000; font-weight: bold;">import</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;java.io.InputStream,
      java.util.Locale,
      java.util.PropertyResourceBundle,
      java.util.ResourceBundle,
      java.util.regex.Pattern,
      java.util.regex.Matcher,
      org.pentaho.platform.util.messages.LocaleHelper,
      org.pentaho.platform.api.engine.IPentahoSession,
      org.pentaho.platform.api.engine.IPluginManager,
      org.pentaho.platform.api.repository.ISolutionRepository,
      org.pentaho.platform.engine.core.system.PentahoSystem,
      org.pentaho.platform.engine.core.system.StandaloneSession,
      org.pentaho.platform.util.logging.Logger,
      org.pentaho.platform.web.jsp.messages.Messages,
      org.pentaho.platform.web.http.PentahoHttpSessionHelper,
      org.apache.commons.lang.StringEscapeUtils&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>
  <span style="color: #666666; font-style: italic;">/*
   * Copyright 2006 Pentaho Corporation.  All rights reserved.
   * This software was developed by Pentaho Corporation and is provided under the terms
   * of the Mozilla Public License, Version 1.1, or any later version. You may not use
   * this file except in compliance with the license. If you need a copy of the license,
   * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
   * BI Platform.  The Initial Developer is Pentaho Corporation.
   *
   * Software distributed under the Mozilla Public License is distributed on an &quot;AS IS&quot;
   * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to
   * the license for the specific language governing your rights and limitations.
   *
   * @created Jul 23, 2005
   * @author James Dixon
   *
   */</span>
<span style="color: #339933;">%&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;%</span>@page <span style="color: #000000; font-weight: bold;">import</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;org.pentaho.ui.xul.XulOverlay&quot;</span><span style="color: #339933;">%&gt;</span>
<span style="color: #339933;">&lt;%</span>@page <span style="color: #000000; font-weight: bold;">import</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;org.pentaho.platform.api.engine.IPluginManager&quot;</span><span style="color: #339933;">%&gt;&lt;</span>html<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>meta http<span style="color: #339933;">-</span>equiv<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;content-type&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/html; charset=ISO-8859-1&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
&nbsp;
<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;&lt;%=</span>Messages.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UI.PUC.LAUNCH.TITLE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">%&gt;&lt;/</span>title<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>style type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/css&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>
body <span style="color: #009900;">&#123;</span>
  color<span style="color: #339933;">:</span> #000000<span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span> #FFFFFF<span style="color: #339933;">;</span>
  margin<span style="color: #339933;">:</span> 0px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
p <span style="color: #009900;">&#123;</span>
  margin<span style="color: #339933;">:</span> 0px<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">:</span> 0px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
A<span style="color: #339933;">:</span>link,A<span style="color: #339933;">:</span>visited,A<span style="color: #339933;">:</span>hover <span style="color: #009900;">&#123;</span>
  color<span style="color: #339933;">:</span> #7e932f<span style="color: #339933;">;</span>
  text<span style="color: #339933;">-</span>decoration<span style="color: #339933;">:</span> underline<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
A<span style="color: #339933;">:</span>hover <span style="color: #009900;">&#123;</span>
  color<span style="color: #339933;">:</span> #ca6333<span style="color: #339933;">;</span>
  text<span style="color: #339933;">-</span>decoration<span style="color: #339933;">:</span> underline<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">launchPanel</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span> white<span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span> url<span style="color: #009900;">&#40;</span>images<span style="color: #339933;">/</span>quicklaunch_bg.<span style="color: #006633;">png</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> no<span style="color: #339933;">-</span>repeat<span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>position<span style="color: #339933;">:</span> center<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_container</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 620px<span style="color: #339933;">;</span>
  margin<span style="color: #339933;">-</span>bottom<span style="color: #339933;">:</span> 50px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_icon_bar_left</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 41px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 147px<span style="color: #339933;">;</span>
  vertical<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> top<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>top<span style="color: #339933;">:</span> 25px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_icon_bar_middle</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span>
    url<span style="color: #009900;">&#40;</span>images<span style="color: #339933;">/</span>ql_icon_bar_middle.<span style="color: #006633;">png</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> repeat<span style="color: #339933;">-</span>x<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
  height<span style="color: #339933;">:</span> 199px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_icon_bar_right</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 41px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 147px<span style="color: #339933;">;</span>
  vertical<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> top<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>top<span style="color: #339933;">:</span> 25px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_spacer</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 20px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 167px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn_left</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 41px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn_middle</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span> url<span style="color: #009900;">&#40;</span>images<span style="color: #339933;">/</span>ql_btn_middle.<span style="color: #006633;">png</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> repeat<span style="color: #339933;">-</span>x<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
  font<span style="color: #339933;">-</span>family<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Trebuchet MS&quot;</span>, Arial, Helvetica, sans<span style="color: #339933;">-</span>serif<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 1.25em<span style="color: #339933;">;</span>
  line<span style="color: #339933;">-</span>height<span style="color: #339933;">:</span> 20px<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">;</span>
  text<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> center<span style="color: #339933;">;</span>
  vertical<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> top<span style="color: #339933;">;</span>
  white<span style="color: #339933;">-</span>space<span style="color: #339933;">:</span> nowrap<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>top<span style="color: #339933;">:</span> 5px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn_right</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 41px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn_left_hover</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 41px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn_middle_hover</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span>
    url<span style="color: #009900;">&#40;</span>images<span style="color: #339933;">/</span>ql_btn_middle_hover.<span style="color: #006633;">png</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> repeat<span style="color: #339933;">-</span>x<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
  font<span style="color: #339933;">-</span>family<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Trebuchet MS&quot;</span>, Arial, Helvetica, sans<span style="color: #339933;">-</span>serif<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 1.25em<span style="color: #339933;">;</span>
  line<span style="color: #339933;">-</span>height<span style="color: #339933;">:</span> 20px<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">;</span>
  text<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> center<span style="color: #339933;">;</span>
  vertical<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> top<span style="color: #339933;">;</span>
  white<span style="color: #339933;">-</span>space<span style="color: #339933;">:</span> nowrap<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>top<span style="color: #339933;">:</span> 5px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_btn_right_hover</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 41px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_new_report</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 120px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 130px<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>bottom<span style="color: #339933;">:</span> 13px<span style="color: #339933;">;</span>
  cursor<span style="color: #339933;">:</span> pointer<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_new_analysis</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 120px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 130px<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>bottom<span style="color: #339933;">:</span> 13px<span style="color: #339933;">;</span>
  cursor<span style="color: #339933;">:</span> pointer<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_manage</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 120px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 130px<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>bottom<span style="color: #339933;">:</span> 13px<span style="color: #339933;">;</span>
  cursor<span style="color: #339933;">:</span> pointer<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">ql_logo</span> <span style="color: #009900;">&#123;</span>
  width<span style="color: #339933;">:</span> 290px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 91px<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>bottom<span style="color: #339933;">:</span> 30px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">button</span> <span style="color: #009900;">&#123;</span>
  cursor<span style="color: #339933;">:</span> pointer<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> 167px<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">:</span> 0px<span style="color: #339933;">;</span>
  spacing<span style="color: #339933;">:</span> 0px<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">btn_left</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span> url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images/ql_btn_left.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> no<span style="color: #339933;">-</span>repeat<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> 22px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">btn_right</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span> url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images/ql_btn_right.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> no<span style="color: #339933;">-</span>repeat<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> 22px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">btn_center</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span> url<span style="color: #009900;">&#40;</span>images<span style="color: #339933;">/</span>ql_btn_middle.<span style="color: #006633;">png</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> repeat<span style="color: #339933;">-</span>x<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
  font<span style="color: #339933;">-</span>family<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Trebuchet MS&quot;</span>, Arial, Helvetica, sans<span style="color: #339933;">-</span>serif<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 1.25em<span style="color: #339933;">;</span>
  line<span style="color: #339933;">-</span>height<span style="color: #339933;">:</span> 20px<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">;</span>
  text<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> center<span style="color: #339933;">;</span>
  vertical<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> top<span style="color: #339933;">;</span>
  white<span style="color: #339933;">-</span>space<span style="color: #339933;">:</span> nowrap<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>top<span style="color: #339933;">:</span> 5px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">btn_left_hover</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span>
    url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images/ql_btn_left_hover.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> no<span style="color: #339933;">-</span>repeat<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> 22px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">btn_right_hover</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span>
    url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images/ql_btn_right_hover.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> no<span style="color: #339933;">-</span>repeat<span style="color: #339933;">;</span>
  height<span style="color: #339933;">:</span> 56px<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> 22px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #006633;">btn_center_hover</span> <span style="color: #009900;">&#123;</span>
  background<span style="color: #339933;">-</span>image<span style="color: #339933;">:</span>
    url<span style="color: #009900;">&#40;</span>images<span style="color: #339933;">/</span>ql_btn_middle_hover.<span style="color: #006633;">png</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #339933;">-</span>repeat<span style="color: #339933;">:</span> repeat<span style="color: #339933;">-</span>x<span style="color: #339933;">;</span>
  width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">%;</span>
  font<span style="color: #339933;">-</span>family<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Trebuchet MS&quot;</span>, Arial, Helvetica, sans<span style="color: #339933;">-</span>serif<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 1.25em<span style="color: #339933;">;</span>
  line<span style="color: #339933;">-</span>height<span style="color: #339933;">:</span> 20px<span style="color: #339933;">;</span>
  font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">;</span>
  text<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> center<span style="color: #339933;">;</span>
  vertical<span style="color: #339933;">-</span>align<span style="color: #339933;">:</span> top<span style="color: #339933;">;</span>
  white<span style="color: #339933;">-</span>space<span style="color: #339933;">:</span> nowrap<span style="color: #339933;">;</span>
  padding<span style="color: #339933;">-</span>top<span style="color: #339933;">:</span> 5px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003399;">Button</span> <span style="color: #339933;">=</span> function<span style="color: #009900;">&#40;</span>label, container<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    var btn <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    btn.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;type&quot;</span>,<span style="color: #0000ff;">&quot;button&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    table <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;table&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    document.<span style="color: #006633;">getElementById</span><span style="color: #009900;">&#40;</span>container<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">innerHTML</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    document.<span style="color: #006633;">getElementById</span><span style="color: #009900;">&#40;</span>container<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>table<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    table.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cellpadding&quot;</span>,<span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cellspacing&quot;</span>,<span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;border&quot;</span>,<span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button&quot;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;height&quot;</span>,<span style="color: #0000ff;">&quot;56&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;width&quot;</span>,<span style="color: #0000ff;">&quot;167&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">cellSpacing</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0px&quot;</span><span style="color: #339933;">;</span>
    table.<span style="color: #006633;">cellPadding</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0px&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    var tbody <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;tbody&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    var tr <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;tr&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    var left_td <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;td&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    left_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_left&quot;</span><span style="color: #339933;">;</span>
    left_td.<span style="color: #006633;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;img src='images/ql_spacer.png'/ width='22' height='1'/&gt;&lt;br/&gt;&quot;</span><span style="color: #339933;">;</span>
    tr.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>left_td<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    var center_td <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;td&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    center_td.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;width&quot;</span>,<span style="color: #0000ff;">&quot;100%&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    center_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_center&quot;</span><span style="color: #339933;">;</span>
    center_td.<span style="color: #006633;">onselectstart</span><span style="color: #339933;">=</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
    center_td.<span style="color: #006633;">style</span>.<span style="color: #006633;">MozUserSelect</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'none'</span><span style="color: #339933;">;</span>
    center_td.<span style="color: #006633;">innerHTML</span> <span style="color: #339933;">=</span> label<span style="color: #339933;">;</span>
    tr.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>center_td<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    var right_td <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;td&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    right_td.<span style="color: #006633;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;img src='images/ql_spacer.png'/ width='22' height='1'/&gt;&lt;br/&gt;&quot;</span><span style="color: #339933;">;</span>
    right_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_right&quot;</span><span style="color: #339933;">;</span>
    tr.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>right_td<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    tbody.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>tr<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    table.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>tbody<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    table.<span style="color: #006633;">onmouseover</span><span style="color: #339933;">=</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      window.<span style="color: #006633;">selectedButton</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span><span style="color: #339933;">;</span>
      left_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_left_hover&quot;</span><span style="color: #339933;">;</span>
      right_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_right_hover&quot;</span><span style="color: #339933;">;</span>
      center_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_center_hover&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">reset</span> <span style="color: #339933;">=</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      left_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_left&quot;</span><span style="color: #339933;">;</span>
      right_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_right&quot;</span><span style="color: #339933;">;</span>
      center_td.<span style="color: #006633;">className</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;btn_center&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    table.<span style="color: #006633;">onmouseout</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">reset</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">onClick</span><span style="color: #339933;">=</span>function<span style="color: #009900;">&#40;</span>onClick<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>window.<span style="color: #006633;">parent</span> <span style="color: #339933;">&amp;&amp;</span> window.<span style="color: #006633;">parent</span>.<span style="color: #006633;">mantle_initialized</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        table.<span style="color: #006633;">onclick</span> <span style="color: #339933;">=</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>eval<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;window.parent.&quot;</span> <span style="color: #339933;">+</span> onClick<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
window.<span style="color: #006633;">onresize</span> <span style="color: #339933;">=</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>window.<span style="color: #006633;">selectedButton</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     window.<span style="color: #006633;">selectedButton</span>.<span style="color: #006633;">onmouseout</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
  <span style="color: #666666; font-style: italic;">// IE_6_FIX: When resized by PUC, IE will display rendering issues. This is accounted for by the code below. </span>
  <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>window.<span style="color: #006633;">isIE6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// IE6 has a rate limit on the number of resize events that it will fire. This means we cannot rely on the</span>
    <span style="color: #666666; font-style: italic;">// resize event alone to determine when the reisize is complete. The timer ensures that the layout is</span>
    <span style="color: #666666; font-style: italic;">// recomputed after PUC is done resizing the iframe.</span>
    setTimeout<span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      window.<span style="color: #006633;">tableWrapperDiv</span>.<span style="color: #006633;">style</span>.<span style="color: #006633;">top</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;1px&quot;</span><span style="color: #339933;">;</span>
      window.<span style="color: #006633;">tableWrapperDiv</span>.<span style="color: #006633;">style</span>.<span style="color: #006633;">top</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0px&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>, <span style="color: #cc66cc;">350</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
function loader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// IE_6_FIX: We're using a CSS filter to enable transparany in IE 6. This has the side-effect of trapping mouse events in the</span>
  <span style="color: #666666; font-style: italic;">// filtered area. The standard workaround is to wrap that area in two divs, one absolutely positioned inside a relative one.</span>
&nbsp;
  var navAgent <span style="color: #339933;">=</span> window.<span style="color: #006633;">navigator</span>.<span style="color: #006633;">userAgent</span><span style="color: #339933;">;</span>
  window.<span style="color: #006633;">isIE6</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  var reg <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;MSIE ([0-9]{1,}[<span style="color: #000099; font-weight: bold;">\.</span>0-9]{0,})&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">exec</span><span style="color: #009900;">&#40;</span>navAgent<span style="color: #009900;">&#41;</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>reg <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    var version <span style="color: #339933;">=</span> parseFloat<span style="color: #009900;">&#40;</span> RegExp.$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    window.<span style="color: #006633;">isIE6</span> <span style="color: #339933;">=</span> version <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">6.0</span> <span style="color: #339933;">&amp;&amp;</span> version <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">7.0</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// The following wrapps the button table with two DIVs, one positioned relative and the other absolute.</span>
  <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>window.<span style="color: #006633;">isIE6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    var buttonTable <span style="color: #339933;">=</span> document.<span style="color: #006633;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;buttonTable&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    var parent <span style="color: #339933;">=</span> buttonTable.<span style="color: #006633;">parentNode</span><span style="color: #339933;">;</span>
    window.<span style="color: #006633;">tableWrapperDiv</span> <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    var absDiv <span style="color: #339933;">=</span> document.<span style="color: #006633;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;div&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    with<span style="color: #009900;">&#40;</span>tableWrapperDiv.<span style="color: #006633;">style</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      position <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;relative&quot;</span><span style="color: #339933;">;</span>
      width <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;100%&quot;</span><span style="color: #339933;">;</span>
      height <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;100%&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    with<span style="color: #009900;">&#40;</span>absDiv.<span style="color: #006633;">style</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      position <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;absolute&quot;</span><span style="color: #339933;">;</span>
      top <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0px&quot;</span><span style="color: #339933;">;</span>
      left <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0px&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    parent.<span style="color: #006633;">removeChild</span><span style="color: #009900;">&#40;</span>buttonTable<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    parent.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>tableWrapperDiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    tableWrapperDiv.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>absDiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    absDiv.<span style="color: #006633;">appendChild</span><span style="color: #009900;">&#40;</span>buttonTable<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    tableWrapperDiv.<span style="color: #006633;">id</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;buttonWrapperDiv&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #666666; font-style: italic;">// End IE_6_FIX</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Button</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;%=Messages.getString( &quot;</span>UI.<span style="color: #006633;">PUC</span>.<span style="color: #006633;">LAUNCH</span>.<span style="color: #006633;">NEW_REPORT</span><span style="color: #0000ff;">&quot; )%&gt;&quot;</span>, <span style="color: #0000ff;">&quot;launch_new_report&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">onClick</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;openWAQR()&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Button</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;%=Messages.getString( &quot;</span>UI.<span style="color: #006633;">PUC</span>.<span style="color: #006633;">LAUNCH</span>.<span style="color: #006633;">NEW_ANALYSIS</span><span style="color: #0000ff;">&quot; )%&gt;&quot;</span>, <span style="color: #0000ff;">&quot;launch_new_analysis&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">onClick</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;openAnalysis()&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;%!</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">ResourceBundle</span> getBundle<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> messageUri<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">Locale</span> locale <span style="color: #339933;">=</span> LocaleHelper.<span style="color: #006633;">getLocale</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    IPentahoSession session <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StandaloneSession<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;dashboards messages&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span>
    <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>messageUri.<span style="color: #006633;">startsWith</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;content/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          messageUri <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;system/&quot;</span> <span style="color: #339933;">+</span> messageUri.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #003399;">InputStream</span> in <span style="color: #339933;">=</span> PentahoSystem.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>ISolutionRepository.<span style="color: #000000; font-weight: bold;">class</span>, session<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getResourceInputStream</span><span style="color: #009900;">&#40;</span>messageUri, <span style="color: #000066; font-weight: bold;">true</span>, ISolutionRepository.<span style="color: #006633;">ACTION_EXECUTE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">PropertyResourceBundle</span><span style="color: #009900;">&#40;</span> in <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      Logger.<span style="color: #006633;">error</span><span style="color: #009900;">&#40;</span> Messages.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;Could not get localization bundle&quot;</span>, e <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">%&gt;&lt;%</span> 
  <span style="color: #000066; font-weight: bold;">boolean</span> pluginButton <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #003399;">String</span> buttonLabel <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #003399;">String</span> buttonCommand <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #003399;">String</span> buttonImage <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
  IPluginManager pluginManager <span style="color: #339933;">=</span> PentahoSystem.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>IPluginManager.<span style="color: #000000; font-weight: bold;">class</span>, PentahoHttpSessionHelper.<span style="color: #006633;">getPentahoSession</span><span style="color: #009900;">&#40;</span>request<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>pluginManager <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>XulOverlay overlayObj <span style="color: #339933;">:</span> pluginManager.<span style="color: #006633;">getOverlays</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>overlayObj.<span style="color: #006633;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> overlayObj.<span style="color: #006633;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;launch&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003399;">ResourceBundle</span> bundle <span style="color: #339933;">=</span> getBundle<span style="color: #009900;">&#40;</span>overlayObj.<span style="color: #006633;">getResourceBundleUri</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// replace I18N parameters</span>
        Pattern p <span style="color: #339933;">=</span> Pattern.<span style="color: #006633;">compile</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>$<span style="color: #000099; font-weight: bold;">\\</span>{([^<span style="color: #000099; font-weight: bold;">\\</span>}]*)<span style="color: #000099; font-weight: bold;">\\</span>}&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Matcher m <span style="color: #339933;">=</span> p.<span style="color: #006633;">matcher</span><span style="color: #009900;">&#40;</span>overlayObj.<span style="color: #006633;">getOverlayXml</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">StringBuffer</span> sb <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">StringBuffer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>m.<span style="color: #006633;">find</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #003399;">String</span> param <span style="color: #339933;">=</span> m.<span style="color: #006633;">group</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          m.<span style="color: #006633;">appendReplacement</span><span style="color: #009900;">&#40;</span>sb, bundle.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span>param<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        m.<span style="color: #006633;">appendTail</span><span style="color: #009900;">&#40;</span>sb<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">String</span> overlay <span style="color: #339933;">=</span> sb.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id=<span style="color: #000099; font-weight: bold;">\&quot;</span>manage_content<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">int</span> startButtonLabel <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;label=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> endButtonLabel <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>, startButtonLabel <span style="color: #339933;">+</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        buttonLabel <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span>startButtonLabel <span style="color: #339933;">+</span> <span style="color: #cc66cc;">7</span>, endButtonLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">int</span> startButtonImage <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;image=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> endButtonImage <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>, startButtonImage <span style="color: #339933;">+</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        buttonImage <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span>startButtonImage <span style="color: #339933;">+</span> <span style="color: #cc66cc;">7</span>, endButtonImage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">int</span> startButtonCommand <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;command=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> endButtonCommand <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>, startButtonCommand <span style="color: #339933;">+</span> <span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        buttonCommand <span style="color: #339933;">=</span> overlay.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span>startButtonCommand <span style="color: #339933;">+</span> <span style="color: #cc66cc;">9</span>, endButtonCommand<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        pluginButton <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
          <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>pluginButton<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">%&gt;</span>    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Button</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;%=buttonLabel%&gt;&quot;</span>, <span style="color: #0000ff;">&quot;manage_content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">onClick</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;%= buttonCommand%&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;%</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">%&gt;</span>    <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Button</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;%=Messages.getString( &quot;</span>UI.<span style="color: #006633;">PUC</span>.<span style="color: #006633;">LAUNCH</span>.<span style="color: #006633;">MANAGE_CONTENT</span><span style="color: #0000ff;">&quot; )%&gt;&quot;</span>, <span style="color: #0000ff;">&quot;manage_content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">onClick</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;openManage()&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;%</span>  <span style="color: #009900;">&#125;</span>  <span style="color: #339933;">%&gt;</span>
    fixPNGs<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;../pngfix.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
      PngFix.<span style="color: #006633;">spacerURL</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;images/ql_spacer.png&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>body onLoad<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;loader()&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>div style<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;margin: 0px; padding: 0px; width: 100%; height: 100%;&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>table style<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;width: 100%; height: 100%;&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;launchPanel&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;launchPanel&quot;</span>
  cellpadding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span> cellspacing<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>td style<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;vertical-align: middle;&quot;</span> align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
    <span style="color: #339933;">&lt;</span>table width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;564&quot;</span> border<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span> align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> cellpadding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span>
      cellspacing<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_container&quot;</span><span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>td colspan<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;3&quot;</span> align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
          src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/ql_logo.png&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Pentaho.com&quot;</span>
          <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_logo&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>td <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_icon_bar_left&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
          src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/ql_icon_bar_left.png&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;41&quot;</span>
          height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;147&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>td <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_icon_bar_middle&quot;</span> <span style="color: #339933;">&gt;</span>
&nbsp;
            <span style="color: #339933;">&lt;</span>table id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;buttonTable&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;100%&quot;</span> border<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span> cellspacing<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span> cellpadding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;0&quot;</span>
              height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;100%&quot;</span><span style="color: #339933;">&gt;</span>
              <span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> valign<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top&quot;</span> onClick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;window.parent.openWAQR()&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
                  src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/btn_ql_newreport.png&quot;</span>
                  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_new_report&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> valign<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top&quot;</span><span style="color: #339933;">&gt;&amp;</span>nbsp<span style="color: #339933;">;&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> valign<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top&quot;</span>
                  onClick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;window.parent.openAnalysis()&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
                  src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/btn_ql_newanalysis.png&quot;</span>
                  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_new_analysis&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> valign<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top&quot;</span><span style="color: #339933;">&gt;&amp;</span>nbsp<span style="color: #339933;">;&lt;/</span>td<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;%</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>pluginButton<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">%&gt;</span>
                <span style="color: #339933;">&lt;</span>td align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> valign<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top&quot;</span>
                  onClick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;window.parent.&lt;%=buttonCommand %&gt;&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
                  src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;../../&lt;%=buttonImage %&gt;&quot;</span>
                  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_manage&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;%</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">%&gt;</span>
                <span style="color: #339933;">&lt;</span>td align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;center&quot;</span> valign<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;top&quot;</span>
                  onClick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;window.parent.openManage()&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
                  src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/btn_ql_manage.png&quot;</span>
                  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_manage&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;%</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">%&gt;</span>
              <span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
              <span style="color: #339933;">&lt;</span>tr<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;launch_new_report&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;100%&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>  container <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">New</span> Report <span style="color: #003399;">Button</span> <span style="color: #339933;">--&gt;</span>
                <span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td<span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/ql_spacer.png&quot;</span>
                  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_spacer&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;launch_new_analysis&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>  container <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">New</span> Analysis <span style="color: #003399;">Button</span> <span style="color: #339933;">--&gt;</span>
                <span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td<span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/ql_spacer.png&quot;</span>
                  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_spacer&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>td id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;manage_content&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>  container <span style="color: #000000; font-weight: bold;">for</span> manage content <span style="color: #003399;">Button</span> <span style="color: #339933;">--&gt;</span>
                <span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
              <span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
          <span style="color: #339933;">&lt;/</span>table<span style="color: #339933;">&gt;</span>
&nbsp;
        <span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>td <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ql_icon_bar_right&quot;</span><span style="color: #339933;">&gt;&lt;</span>img
          src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;images/ql_icon_bar_right.png&quot;</span>
          width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;41&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;147&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>td<span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>table<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>td<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;/</span>tr<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>table<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>

<p class="notice">Before you make any changes to <span class="pre-inline">launch.jsp</span> make sure you keep a backup copy.</p>
<h4><strong>Example 1</strong></h4>
<p>The <span class="inline-pre">launch.jsp</span> page is like any other JSP (or HTML) page. For example, if I wanted to make the <span class="inline-pre">launch.jsp</span> page display my blog&#8217;s logo all I need to do is change the contents of the <span class="inline-pre">launch.jsp</span> file so that they now look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=ISO-8859-1&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Launch<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;margin: 0px; padding: 0px; width: 100%; height: 100%;&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width: 100%; height: 100%;&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;launchPanel&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;launchPanel&quot;</span> <span style="color: #000066;">cellpadding</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;vertical-align: middle;&quot;</span> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;center&quot;</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/logo.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Logo&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>I have placed the <span class="inline-pre">logo.jpg</span> image under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/launch/images/</span> directory.</p>
<p>After refreshing the browser the new <span class="inline-pre">launch.jsp</span> now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/2_New_Launch_Page.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/2_New_Launch_Page-300x239.jpg" alt="Adding a Logo to the Launch Page" title="Adding a logo to the launch page" width="300" height="239" class="alignnone size-medium wp-image-1057" /></a></p>
<h4><strong>Example 2</strong></h4>
<p>You could also embed information from other sites i.e. intranet home page etc. by using an <span class="inline-pre">iframe</span>. For example, to include Google News instead of the default launch page I will need to make changes to the <span class="inline-pre">launch.jsp</span> page so that it now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=ISO-8859-1&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Launch<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.google.com/news&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Your browser does not support iframes.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>After refreshing the browser the new <span class="inline-pre">launch.jsp</span> now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/3_New_Launch_Page.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/3_New_Launch_Page-300x239.jpg" alt="External Content with Launch Page" title="External content with launch page" width="300" height="239" class="alignnone size-medium wp-image-1058" /></a></p>
<h4><strong>Example 3</strong></h4>
<p>Another example would be to add a list of links to key reports, analysis views and/or dashboards using xactions. Just say I would like to create a list which are links for the following:</p>
<ul>
<li>Area Chart Example (Steel Wheels > Charts)</li>
<li>Marketing Analysis by Year (Steel Wheels > Analysis)</li>
</ul>
<p>After making changes the <span class="inline-pre">launch.jsp</span> file now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=ISO-8859-1&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Launch<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Steel Wheels Launch pad<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Maybe one of these reports/analysis/dashboards can help you:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://localhost:8080/pentaho/ViewAction?&amp;solution=steel-wheels&amp;path=charts&amp;action=areachart_data.xaction&quot;</span>&gt;</span>Area Chart Example<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://localhost:8080/pentaho/ViewAction?&amp;solution=steel-wheels&amp;path=analysis&amp;action=analysis_customers.analysisview.xaction&quot;</span>&gt;</span>Marketing Analysis by Year<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>After refreshing the browser the new <span class="inline-pre">launch.jsp</span> now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/4_New_Launch_Page.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/4_New_Launch_Page-300x254.jpg" alt="Links to Report Launch Page" title="Links to reports launch page" width="300" height="254" class="alignnone size-medium wp-image-1059" /></a></p>
<h4><strong>Example 4</strong></h4>
<p>You can also redirect the <span class="inline-pre">launch.jsp</span> page to a xaction, to do this change the contents of the <span class="inline-pre">launch.jsp</span> file so that they now look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>
    <span style="color: #666666; font-style: italic;">// xactionPath is the xaction path</span>
    <span style="color: #003399;">String</span> xactionPath <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://localhost:8080/pentaho/ViewAction?&amp;solution=steel-wheels&amp;path=analysis&amp;action=analysis_customers.analysisview.xaction&quot;</span><span style="color: #339933;">;</span>
    response.<span style="color: #006633;">sendRedirect</span><span style="color: #009900;">&#40;</span>xactionPath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">%&gt;</span></pre></div></div>

<p>After refreshing the browser the new <span class="inline-pre">launch.jsp</span> will automatically redirect to the xaction specified.</p>
<h3>Final Notes</h3>
<p>If you want to embed or replace the <span class="inline-pre">launch.jsp</span> with xactions, dashboards, reports etc. I believe that you should use the startup-urls option instead, this option is covered in my previous post <a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-3/">Customising the Pentaho User Console &#8211; Part 3</a>.</p>
<p>Do you have any other examples? Post a comment or drop me an <a href="mailto:prashant.g.raju@gmail.com">email</a> and I&#8217;ll add it to this post.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/03/customising-the-pentaho-user-console-part-4/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Emailing Reports from the Pentaho User Console.</title>
		<link>http://www.prashantraju.com/2010/03/emailing-reports-from-the-pentaho-user-console/</link>
		<comments>http://www.prashantraju.com/2010/03/emailing-reports-from-the-pentaho-user-console/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 16:00:41 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[BI Server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[User Console]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=906</guid>
		<description><![CDATA[With the recent release of Pentaho&#8217;s BI Server 3.5.2 and Tom Barber&#8217;s (aka magicaltrout) post I thought I would put together a quick tutorial on how to use a new feature of 3.5.2 which allows end users to email reports directly from the Pentaho User Console (PUC). The Scenario. I need to create a public [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent release of Pentaho&#8217;s BI Server 3.5.2 and <a href="http://pentahomusings.blogspot.com" target="_blank">Tom Barber&#8217;s</a> (aka magicaltrout) <a href="http://pentahomusings.blogspot.com/2010/02/first-month-using-352.html" target="_blank">post</a> I thought I would put together a quick tutorial on how to use a new feature of 3.5.2 which allows end users to email reports directly from the Pentaho User Console (PUC).</p>
<p><span id="more-906"></span></p>
<h3>The Scenario.</h3>
<p>I need to create a public schedule which will run out of business hours. Coincidently after creating the public schedule I&#8217;m approached by a Sales Manager who requests that I run the <span class="inline-pre">Top N Analysis</span> report which is needed for tomorrow&#8217;s weekly meeting. As this particular report takes a while to run I will assign it to public schedule (created earlier) which will run the report out of business hours and email to the Sales Manager before his/hers weekly meeting.</p>
<h3>Step 1 &#8211; Setup SMTP.</h3>
<p>The first step is to make sure you have setup the Pentaho BI Server to talk to your SMTP server correctly. The configuration file for the SMTP server is <span class="inline-pre">email_config.xml</span> which is located under the <span class="inline-pre">/pentaho-solutions/system/smtp-email/</span> directory. The contents of the <span class="inline-pre">email_config.xml</span> looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;email-smtp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #808080; font-style: italic;">&lt;!-- The values within &lt;properties&gt; are passed directly to the JavaMail API.</span>
<span style="color: #808080; font-style: italic;">       For a list of valid properties see http://java.sun.com/products/javamail/javadocs/index.html --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- This is the address of your SMTP email server for sending email. e.g. smtp.pentaho.org --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.host<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.host<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  This is the port of your SMTP email server. Usually this is 25. For GMail this is 587 --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>25<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  The transport for accessing the email server. Usually this is smtp. For GMail this is smtps --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.transport.protocol<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>smtp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.transport.protocol<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  Usually this is 'false'. For GMail it is 'true' --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.starttls.enable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.starttls.enable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Set to true if the email server requires the sender to authenticate --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.auth<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.auth<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  This is true if the email server requires an SSL connection. Usually 'false'. For GMail this is 'true' --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.ssl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.ssl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  	<span style="color: #808080; font-style: italic;">&lt;!--  Output debug information from the JavaMail API --&gt;</span>
   	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.debug<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.debug<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #808080; font-style: italic;">&lt;!-- For GMail this is 'false' --&gt;</span>
    <span style="color: #808080; font-style: italic;">&lt;!--mail.smtp.quitwait&gt;false&lt;/mail.smtp.quitwait--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- The is the address of your POP3 email server for receiving email. e.g. pop.pentaho.org --&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!-- It is currently not used --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.pop3<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/mail.pop3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- This is the default 'from' address that emails from the Pentaho BI Platform will appear to come from e.g. joe.pentaho@pentaho.org --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.from.default<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/mail.from.default<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- This is the user id used to connect to the email server for sending email</span>
<span style="color: #808080; font-style: italic;">       It is only required if email-authenticate is set to true</span>
<span style="color: #808080; font-style: italic;">       This is never sent or shown to anyone --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.userid<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/mail.userid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- This is the password used to connect to the email server for sending email It is only required if email-authenticate is set to true</span>
<span style="color: #808080; font-style: italic;">       This is never sent or shown to anyone --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.password<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/mail.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/email-smtp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Below is the <span class="inline-pre">email_config.xml</span> settings I used for my GMail account:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;email-smtp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- This is the address of your SMTP email server for sending email. e.g. smtp.pentaho.org --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.host<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>smtp.gmail.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.host<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  This is the port of your SMTP email server. Usually this is 25. For GMail this is 587 --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>587<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  The transport for accessing the email server. Usually this is smtp. For GMail this is smtps --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.transport.protocol<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>smtps<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.transport.protocol<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  Usually this is 'false'. For GMail it is 'true' --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.starttls.enable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.starttls.enable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Set to true if the email server requires the sender to authenticate --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.auth<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.auth<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!--  This is true if the email server requires an SSL connection. Usually 'false'. For GMail this is 'true' --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.ssl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.ssl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #808080; font-style: italic;">&lt;!-- For GMail this is 'false' --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.smtp.quitwait<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.smtp.quitwait<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- The is the address or your POP3 email server for receiving email. e.g. pop.pentaho.org --&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!-- It is currently not used --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.pop3<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/mail.pop3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- This is the default 'from' address that emails from the Pentaho BI Platform will appear to come from e.g. joe.pentaho@pentaho.org --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.from.default<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>prashant.g.raju@gmail.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.from.default<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- This is the user id used to connect to the email server for sending email</span>
<span style="color: #808080; font-style: italic;">       It is only required if email-authenticate is set to true</span>
<span style="color: #808080; font-style: italic;">       This is never sent or shown to anyone --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.userid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>prashant.g.raju@gmail.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.userid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- This is the password used to connect to the email server for sending email </span>
<span style="color: #808080; font-style: italic;">       It is only required if email-authenticate is set to true</span>
<span style="color: #808080; font-style: italic;">       This is never sent or shown to anyone --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mail.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #808080; font-style: italic;">&lt;!-- passoword --&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mail.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/email-smtp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>You can test if you have configured Pentaho BI Server to talk to the SMTP server correctly by running the <span class="inline-pre">Burst Sales Report</span> which is located under the <span class="inline-pre">BI Developer Examples/Reporting/</span> solution folder.<br />
Click on the report and fill out the prompts including your email address:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Burst_Email_Prompt_1.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Burst_Email_Prompt_1-300x217.jpg" alt="Report Bursting Example - Prompt 1" title="Report Bursting Example - Prompt 1" width="300" height="217" class="alignnone size-medium wp-image-1035" /></a></p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Burst_Email_Prompt_2.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Burst_Email_Prompt_2-300x217.jpg" alt="Report Bursting Example - Prompt 2" title="Report Bursting Example - Prompt 2" width="300" height="217" class="alignnone size-medium wp-image-1036" /></a></p>
<p>After clicking the <strong>Run</strong> button you should receive an email for each employee and the report as a PDF attachment.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Report_Burst_Example.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Report_Burst_Example-300x173.jpg" alt="Report Burst Example" title="Report Burst Example" width="300" height="173" class="alignnone size-medium wp-image-1037" /></a></p>
<h3>Step 2 &#8211; Create a Public Schedule.</h3>
<p>The next step is to create a <strong>Public Schedule</strong>. To do this you must have access to the Pentaho Administration Console (PAC), after logging into PAC click on the <strong>Administration</strong> menu item and then the <strong>Scheduler</strong> tab:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/1_PAC_Scheduler_Tab.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/1_PAC_Scheduler_Tab-300x225.jpg" alt="PAC Scheduler Tab" title="PAC Scheduler Tab" width="300" height="225" class="alignnone size-medium wp-image-992" /></a></p>
<p>To create a new schedule click on the <img src="http://www.prashantraju.com/wp-content/uploads/2010/03/2_PAC_Create_Schedule_Icon.jpg" alt="PAC Create Schedule Icon" title="PAC Create Schedule Icon" width="19" height="19" class="alignnone size-full wp-image-993" /> icon (Create schedule), this will display a <strong>Schedule Creator</strong> window with the <strong>Schedule</strong> tab active:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/3_PAC_Schedule_Creator.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/3_PAC_Schedule_Creator-264x300.jpg" alt="PAC Schedule Creator" title="PAC Schedule Creator" width="264" height="300" class="alignnone size-medium wp-image-994" /></a></p>
<ul>
<li><strong>Public Schedule &#8211; Allow users access to the schedule</strong> : Check this option to make this schedule public</li>
<li><strong>Name</strong> : Name of your schedule i.e. Ad hoc Reports</li>
<li><strong>Group</strong> : Group which your schedule belongs to i.e. Ad hocs</li>
<li><strong>Description</strong> : Description of your schedule i.e. Use this schedule to run lengthy ad hoc reports out of business hours</li>
<li><strong>Recurrence</strong> : How often do you want the schedule to run i.e. Daily
<ul>
<li><strong>Recurrence pattern</strong> : On which days you want the schedule to run (this will be different for Monthly, Yearly etc. recurrences) i.e. On weekdays</li>
<li><strong>Range of recurrence</strong> : The date the schedule is to start and end i.e. The schedule is start on the 2nd of March 2010 till no end date</li>
</ul>
</li>
</ul>
<p>After filling out the options the <strong>Schedule Creator</strong> window now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/4_PAC_Schedule_Creator_Opti.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/4_PAC_Schedule_Creator_Opti-264x300.jpg" alt="PAC Schedule Creator with Options" title="PAC Schedule Creator with Options" width="264" height="300" class="alignnone size-medium wp-image-995" /></a></p>
<p>You can also assign files directly to this schedule by clicking on the <strong>Selected Files</strong> tab:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/5_PAC_Selected_Files.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/5_PAC_Selected_Files-264x300.jpg" alt="PAC Selected Files Window" title="PAC Selected Files Window" width="264" height="300" class="alignnone size-medium wp-image-996" /></a></p>
<p>Within the <strong>Selected Files</strong> tab you are able to assign reports (and xactions) to the schedule, <em>in this example I will not be assigning any reports to this schedule</em>. If you want to add reports click the <img src="http://www.prashantraju.com/wp-content/uploads/2010/03/6_PAC_Add_File.jpg" alt="PAC Add File Icon" title="PAC Add File Icon" width="15" height="15" class="alignnone size-full wp-image-1011" /> icon (Add item) and use the file browser to locate your report:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/7_PAC_File_Browser.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/7_PAC_File_Browser-300x202.jpg" alt="PAC File Browser Window" title="PAC File Browser Window" width="300" height="202" class="alignnone size-medium wp-image-997" /></a></p>
<p>When you have found your report click on the <strong>Select</strong> button to add it to the schedule.</p>
<p>After completing all the options available on the <strong>Schedule</strong> tab click the <strong>OK</strong> button. You should now see the <strong>Ad hoc</strong> reports schedule in the schedule list:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/8_PAC_Scheduled_List.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/8_PAC_Scheduled_List-300x225.jpg" alt="PAC File Browser Window" title="PAC Scheduled List" width="300" height="225" class="alignnone size-medium wp-image-998" /></a></p>
<h3>Step 3 &#8211; Setup and Email the Report.</h3>
<p>The next step is to assign the report to the schedule, setup the parameters (including the email address) and schedule the report <strong>all from the PUC</strong>. Log into the PUC with a user who has access to the report (<span class="inline-pre">Top N Analysis</span>) and can schedule reports &#8211; in this example I&#8217;m using the user Joe. The report that needs to be sent out is <span class="inline-pre">Top N Analysis</span> which is located under the <span class="inline-pre">/Steel Wheels/Reporting/</span> solutions folder. Right click on the report under the <strong>Files</strong> section and select the <strong>Share</strong> option:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/9_PUC_Share.jpg" alt="PUC Share Option" title="PUC Share Option" width="251" height="269" class="alignnone size-full wp-image-999" /></p>
<p>Within the <strong>Properties</strong> window click the <strong>Advanced</strong> tab and check the <strong>Use Public Schedules</strong> option and move the <span class="inline-pre">Ad hoc Reports</span> option under the <strong>Available:</strong> list to the <strong>Current:</strong> list using the <strong>></strong> arrow and click the <strong>OK</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/10_PUC_Current_List.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/10_PUC_Current_List-278x300.jpg" alt="PUC Advanced Tab Current Public Schedules" title="PUC Advanced Tab Current Public Schedules" width="278" height="300" class="alignnone size-medium wp-image-1000" /></a></p>
<p>Right click on the report again and select the <strong>Schedule&#8230;</strong> option:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/11_PUC_Schedule.jpg" alt="PUC Schedule... Option" title="PUC Schedule... Option" width="251" height="269" class="alignnone size-full wp-image-1001" /></p>
<p>After clicking the <strong>Schedule&#8230;</strong> option the <strong>Top N Analysis</strong> report will open up in a new tab:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/In_Report_Tab_Old_Opt.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/In_Report_Tab_Old_Opt-300x254.jpg" alt="Report Setup with Old Options" title="Report Setup with Old Options" width="300" height="254" class="alignnone size-medium wp-image-1087" /></a></p>
<p>The <strong>Report Parameters</strong> section is where you define the default parameters for this report. The Sales Manager has requested that the report parameters are:</p>
<p class="notice">Before entering this parameters make sure you uncheck the <strong>Auto Submit</strong> option</p>
<ul>
<li><strong>Product Line</strong> : Classic Cars</li>
<li><strong>Region</strong> : APAC</li>
<li><strong>Year</strong> : 2003</li>
<li><strong>Top N Customers</strong> : 10</li>
<li><strong>Output Type</strong> : PDF</li>
</ul>
<p>The <strong>Schedule Report</strong> section is the new improvement with Pentaho&#8217;s BI Server 3.5.2:</p>
<ul>
<li><strong>Report Name</strong> : The title of the report this is also displayed in the Email subject line i.e. Top 10 Classic Car Customers for APAC</li>
<li><strong>E-mail To</strong> : The report recipient’s email addresses i.e. prashant.g.raju@gmail.com. If you would like to specify more than one address seperate the emails with a , (comma) i.e. prashant.g.raju@gmail.com,prashant@analysethis.com.au</li>
<li><strong>Subscription</strong> : Which public subscription this report belongs to i.e. Ad hoc</li>
</ul>
<p>After filling out all the options click the <strong>View Report</strong> button to preview the report before you schedule it:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/In_Report_Tab_New_Opt.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/In_Report_Tab_New_Opt-300x254.jpg" alt="Report Setup with New Options" title="In Report Tab New Opt" width="300" height="254" class="alignnone size-medium wp-image-1086" /></a></p>
<p>Once you are happy with the report preview click the <strong>Schedule</strong> button. If successful you should receive the following message:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/14_PUC_Success.jpg" alt="PUC Scheduled Report Successful" title="PUC Scheduled Report Successful" width="398" height="111" class="alignnone size-full wp-image-1004" /></p>
<h3>Step 4 &#8211; Check the Report Schedule.</h3>
<p>You can check the status of the report by clicking on the <img src="http://www.prashantraju.com/wp-content/uploads/2010/03/workspace_32.png" alt="Workspace icon" title="workspace_32" width="32" height="32" class="alignnone size-full wp-image-1006" style="padding:0;" /> icon (Workspace) on the main toolbar. You are able to see the status of the <strong>Ad hoc</strong> public schedule under the <strong>All Schedules (Admin Only)</strong> section and the status of the <strong>Top 10 Classic Car Customers for APAC</strong> under the <strong>Public Schedules</strong> section:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/15_PUC_Workspace.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/15_PUC_Workspace-300x128.jpg" alt="PUC Workspace" title="PUC Workspace" width="300" height="128" class="alignnone size-medium wp-image-1005" /></a></p>
<h3>Step 5 &#8211; The Email.</h3>
<p>When the sales manager receives the email it will look similar to this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Report_As_Email.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Report_As_Email-300x173.jpg" alt="Report As Email" title="Report As Email" width="300" height="173" class="alignnone size-medium wp-image-1039" /></a></p>
<h3>Step 6 &#8211; Delete the Scheduled Report.</h3>
<p>After the report has successfully run and has been emailed to the Sales Manager you will need to remove it from the Ad hoc schedule (if you don&#8217;t the Sales Manager will keep receiving this email on weekdays out of business hours). Click on the <img src="http://www.prashantraju.com/wp-content/uploads/2010/03/workspace_32.png" alt="Workspace icon" title="workspace_32" width="32" height="32" class="alignnone size-full wp-image-1006" style="padding:0;" /> icon (Workspace) on the main toolbar and click on the <strong>Delete</strong> link next the report under the <strong>Public Schedules</strong> section:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/17_Delete_Report.jpg"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/17_Delete_Report-300x38.jpg" alt="Delete Report" title="Delete Report" width="300" height="38" class="alignnone size-medium wp-image-1012" /></a></p>
<h3>Final Notes.</h3>
<p>I&#8217;m not sure that the example I provided is a viable solution as in most cases the users can log in and run the report themselves. I personally see this functionality beneficial when running large reports which need to be run and sent out of business hours i.e. extracts.</p>
<p>Enjoy.<!--more--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/03/emailing-reports-from-the-pentaho-user-console/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Customising the Pentaho User Console &#8211; Part 3.</title>
		<link>http://www.prashantraju.com/2010/03/customising-the-pentaho-user-console-part-3/</link>
		<comments>http://www.prashantraju.com/2010/03/customising-the-pentaho-user-console-part-3/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 10:09:14 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[BI Server]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[User Console]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=911</guid>
		<description><![CDATA[This post is part 3 of the series “Customising the Pentaho User Console (PUC)” Version 3.5.x. Here is a list of what I have covered in other parts: Login page and dialog Messages Main toolbar, menu bar and logo panel (covered in this post) Launch page In this post I will show you how to [...]]]></description>
			<content:encoded><![CDATA[<p>This post is part 3 of the series “Customising the Pentaho User Console (PUC)” Version 3.5.x. Here is a list of what I have covered in other parts:</p>
<ul>
<li><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-1/">Login page and dialog</a></li>
<li><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-2/">Messages</a></li>
<li><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-3/"><strong>Main toolbar, menu bar and logo panel (covered in this post)</strong></a></li>
<li>Launch page</li>
</ul>
<p><strong>In this post I will show you how to customise the main-toolbar, menu-bar, logo-panel and other features for the PUC.</strong></p>
<p><span id="more-911"></span></p>
<h3>The Pentaho User Console</h3>
<p>Below is a screenshot with overlays that highlight the different areas of the PUC:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/PUC_Overview.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/PUC_Overview-300x205.jpg" alt="A screenshot with overlays of the areas which make up the PUC" title="PUC Overview" width="300" height="205" class="alignnone size-medium wp-image-924" /></a></p>
<h3>Table of Contents</h3>
<p class="notice">This tutorial has been tested with Pentaho BI Server 3.5.0 and 3.5.2.</p>
<p>I have split the tutorial into 4 different sections which involve making modifications to .PROPERTIES, .XUL, .PNG files and checking out and building the source code. Here is a &#8216;table of contents&#8217; for this tutorial:</p>
<ul>
<li><a href="#1"><strong>MantleSettings.properties</strong></a>
<ul>
<li><a href="#1b">Displaying Tabs when PUC Launches</a></li>
<li><a href="#1c">Show/Hide the menu-bar, main-toolbar and logo-panel</a></li>
<li><a href="#1d">Other Options</a></li>
</ul>
</li>
<li><a href="#2"><strong>Change the Default logo-panel Logo</strong></a></li>
<li><a href="#3"><strong>main_toolbar.xul</strong></a>
<ul>
<li><a href="#3a">Show/Hide Buttons on the main-toolbar</a></li>
</ul>
</li>
<li><a href="#5"><strong>Modifying the Source Code</strong></a>
<ul>
<li><a href="#5a">Requirements</a></li>
<li><a href="#5b">Checking Out the Source Code</a></li>
<li><a href="#5c">Examples</a>
<ul>
<li><a href="#5c1">Show/Hide menu-bar Items</a></li>
<li><a href="#5c2">Change the URL of the logo-panel</a></li>
<li><a href="#5c3">Add a Logout Button to the main-toolbar</a></li>
</ul>
</li>
<li><a href="#5d">Building the source</a></li>
</ul>
</li>
</ul>
<h3><a name="1"></a>MantleSettings.properties</h3>
<p>The <span class="inline-pre">MantleSettings.properties</span> file is located inside the <span class="inline-pre">mantle-3.5.0.stable.jar</span> file under the <span class="inline-pre">/tomcat/webapps/pentaho/WEB-INF/lib/</span> directory.</p>
<p>To make modifications to the <span class="inline-pre">MantleSettings.properties</span> you will need to have an archive tool installed i.e. <a href="http://www.winzip.com/" target="_blank">WinZip</a>, <a href="http://www.winrar.com/" target="_blank">WinRAR</a> etc. in this example I will be using WinZip. Right click on the <span class="inline-pre">mantle-3.5.0.stable.jar</span> file and click the <strong>Open With</strong> &gt; <strong>WinZip</strong> option:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Open_With_WinZip.jpg" alt="Open the mantle.3.5.0.stable.jar file with WinZip" title="Open with Winzip" width="423" height="107" class="alignnone size-full wp-image-929" /></p>
<p>Once you have opened the <span class="inline-pre">mantle-3.5.0.stable.jar</span> file with your archive tool find the <span class="inline-pre">MantleSettings.properties</span> file which is located under the <span class="inline-pre">org\pentaho\mantle\server\</span> directory and open it with a text editor &#8211; in this example I will be using <a href="http://www.pspad.com" target="_blank">PSPad</a>. Right click on the <span class="inline-pre">MantleSettings.properties</span> and click the <strong>Open With</strong> > <strong>PSPad editor</strong> option:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Open_With_PSPad.jpg" alt="Open the MantleSettings.properties file with PSPad" title="Open with PSPad" width="470" height="121" class="alignnone size-full wp-image-930" /></p>
<p>You should now be able to see the contents of the <span class="inline-pre">MantleSettings.properties</span> file:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">show-explorer-view-on-startup</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-advanced-features</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">false</span>
<span style="color: #808080; font-style: italic;"># startup urls (each displays in its own tab)</span>
<span style="color: #000080; font-weight:bold;">num-startup-urls</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">0</span>
<span style="color: #000080; font-weight:bold;">startup-url-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/welcome/welcome.html</span>
<span style="color: #000080; font-weight:bold;">startup-name-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Welcome</span>
<span style="color: #000080; font-weight:bold;">startup-url-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">http://www.pentaho.com</span>
<span style="color: #000080; font-weight:bold;">startup-name-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Pentaho Business Intelligence</span>
<span style="color: #000080; font-weight:bold;">startup-url-3</span><span style="color: #000000;">=</span><span style="color: #000000;"><span style="color: #008000; font-weight:bold;">/pentaho/ViewAction?solution=samples&amp;amp;path=/reporting&amp;amp;action=JFree_Quad.xaction</span></span>
<span style="color: #000080; font-weight:bold;">startup-url-4</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/SampleDashboard</span>
<span style="color: #808080; font-style: italic;"># plugin perspectives</span>
<span style="color: #000080; font-weight:bold;">num-plugin-perspectives</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">0</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-url-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/adhoc/waqr.html</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-name-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Ad hoc Reporting</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-url-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/interactive-reporting/index.html</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-name-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Interactive Reporting</span>
<span style="color: #808080; font-style: italic;"># ui customization settings (if menu/toolbar are disabled, the logo panel is disabled automatically)</span>
<span style="color: #000080; font-weight:bold;">show-menu-bar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-main-toolbar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-logo-panel</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span></pre></div></div>

<p>After you save any changes you make to the <span class="inline-pre">MantleSettings.properties</span> your archive tool <strong>should</strong> prompt you to update the <span class="inline-pre">mantle-3.5.0.stable.jar</span> archive. For example WinZip displays the following prompt box after I save any changes to the <span class="inline-pre">MantleSettings.properties</span> file:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Accept_To_Update_Archive.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Accept_To_Update_Archive-300x45.jpg" alt="A prompt from WinZip that warns a user to update the archive" title="Accept to update archive" width="300" height="45" class="alignnone size-medium wp-image-931" /></a></p>
<h4><strong><a name="1b"></a>Displaying Tabs when PUC Launches</strong></h4>
<p>The <span class="inline-pre">startup-urls</span> option provides functionality to tell the PUC to open tabs with predefined content when it launches i.e. welcome, intranet pages etc. The following section within the <span class="inline-pre">MantleSettings.properties</span> file is where you define these options:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># startup urls (each displays in its own tab)</span>
<span style="color: #000080; font-weight:bold;">num-startup-urls</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">0</span>
<span style="color: #000080; font-weight:bold;">startup-url-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/welcome/welcome.html</span>
<span style="color: #000080; font-weight:bold;">startup-name-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Welcome</span>
<span style="color: #000080; font-weight:bold;">startup-url-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">http://www.pentaho.com</span>
<span style="color: #000080; font-weight:bold;">startup-name-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Pentaho Business Intelligence</span>
<span style="color: #000080; font-weight:bold;">startup-url-3</span><span style="color: #000000;">=</span><span style="color: #000000;"><span style="color: #008000; font-weight:bold;">/pentaho/ViewAction?solution=samples&amp;amp;path=/reporting&amp;amp;action=JFree_Quad.xaction</span></span>
<span style="color: #000080; font-weight:bold;">startup-url-4</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/SampleDashboard</span></pre></div></div>

<ul>
<li><strong>num-startup-urls</strong> : The amount of URLs you would like to load when PUC launches</li>
<li><strong>startup-url-x</strong> : The location of the content which will appear in the tab (x is a user defined unique id) i.e. a webpage or xaction</li>
<li><strong>startup-name-x</strong> : The title of the tab which will contain the content you specified in the startup-url-x option (x is a user defined unique id) i.e. Welcome or Sales Dashboard</li>
</ul>
<p>In this example I would like to load two tabs when a user logs into the PUC:</p>
<ol>
<li>A tab titled Welcome which will display the <span class="inline-pre">/pentaho/welcome/welcome.html</span> page</li>
<li>A tab titled Pentaho Business Intelligence which will display the <span class="inline-pre">/pentaho/ViewAction?solution=samples&amp;path=/reporting&amp;action=JFree_Quad.xaction</span> xaction</li>
</ol>
<p>After making changes to the <span class="inline-pre">MantleSettings.properties</span> file the <span class="inline-pre">startup-urls</span> section now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># startup urls (each displays in its own tab)</span>
<span style="color: #000080; font-weight:bold;">num-startup-urls</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">2</span>
<span style="color: #000080; font-weight:bold;">startup-url-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/welcome/welcome.html</span>
<span style="color: #000080; font-weight:bold;">startup-name-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Welcome</span>
<span style="color: #000080; font-weight:bold;">startup-url-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">http://www.pentaho.com</span>
<span style="color: #000080; font-weight:bold;">startup-name-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Pentaho Business Intelligence</span>
<span style="color: #000080; font-weight:bold;">startup-url-3</span><span style="color: #000000;">=</span><span style="color: #000000;"><span style="color: #008000; font-weight:bold;">/pentaho/ViewAction?solution=samples&amp;amp;path=/reporting&amp;amp;action=JFree_Quad.xaction</span></span>
<span style="color: #000080; font-weight:bold;">startup-url-4</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/SampleDashboard</span></pre></div></div>

<p>Restart your Apache-Tomcat server and clear your browsers cache. When you launch the PUC two tabs are loaded automatically (with the titles and content defined above):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Num_Startup_Urls_2.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Num_Startup_Urls_2-300x266.jpg" alt="When the num-startup-urls option is set to 2" title="num-startup-urls=2" width="300" height="266" class="alignnone size-medium wp-image-932" /></a></p>
<h4><a name="1c"></a><strong>Show/Hide the menu-bar, main-toolbar and logo-panel</strong></h4>
<p>The <span class="inline-pre">show-menu-bar</span>, <span class="inline-pre">show-main-toolbar</span> and <span class="inline-pre">show-logo-panel</span> options can show/hide the menu-bar, main-toolbar or logo-panel. <em>If you decide to hide the menu-bar or main-toolbar the logo-panel is automatically hidden.</em></p>
<p>The following section within the <span class="inline-pre">MantleSettings.properties</span> file is where you define these options:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># ui customization settings (if menu/toolbar are disabled, the logo panel is disabled automatically)</span>
<span style="color: #000080; font-weight:bold;">show-menu-bar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-main-toolbar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-logo-panel</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span></pre></div></div>

<p>Below are the different options and screenshots in action (after making any changes make sure you restart your Apache-Tomcat server and clear your browsers cache):</p>
<h5><strong>Show All</strong></h5>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Show_All.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Show_All-300x217.jpg" alt="Show menu-bar, main-toolbar and logo-panel" title="Show All" width="300" height="217" class="alignnone size-medium wp-image-936" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">show-menu-bar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-main-toolbar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-logo-panel</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span></pre></div></div>

<h5><strong>show-menu-bar=false</strong></h5>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Show_Menu_Bar_False.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Show_Menu_Bar_False-300x266.jpg" alt="When the show-menu-bar opotion is set to false" title="show-menu-bar=false" width="300" height="266" class="alignnone size-medium wp-image-934" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">show-menu-bar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">false</span>
<span style="color: #000080; font-weight:bold;">show-main-toolbar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-logo-panel</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span></pre></div></div>

<h5><strong>show-main-toolbar=false</strong></h5>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Hide_Main_Toolbar.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Hide_Main_Toolbar-300x217.jpg" alt="Set the show-main-toolbar option to false" title="Hide Main Toolbar" width="300" height="217" class="alignnone size-medium wp-image-937" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">show-menu-bar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-main-toolbar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">false</span>
<span style="color: #000080; font-weight:bold;">show-logo-panel</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span></pre></div></div>

<h5><strong>show-logo-panel=false</strong></h5>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Show_Logo_Panel_False.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Show_Logo_Panel_False-300x266.jpg" alt="The logo-panel is not shown when the show-logo-panel=false" title="show-logo-panel=false" width="300" height="266" class="alignnone size-medium wp-image-933" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">show-menu-bar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-main-toolbar</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-logo-panel</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">false</span></pre></div></div>

<h4><strong><a name="1d"></a>Other Options</strong></h4>
<p>You may have noticed other options available in the <span class="inline-pre">MantleSettings.properties</span> file:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #000080; font-weight:bold;">show-explorer-view-on-startup</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">true</span>
<span style="color: #000080; font-weight:bold;">show-advanced-features</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">false</span>
...
<span style="color: #808080; font-style: italic;"># plugin perspectives</span>
<span style="color: #000080; font-weight:bold;">num-plugin-perspectives</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">0</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-url-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/adhoc/waqr.html</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-name-1</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Ad hoc Reporting</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-url-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">/pentaho/interactive-reporting/index.html</span>
<span style="color: #000080; font-weight:bold;">plugin-perspective-name-2</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">Interactive Reporting</span>
...</pre></div></div>

<p>Below is my attempt of trying to explain these options (if you have more information on these options please let me <a href="mailto:prashant.g.raju@gmail.com">know</a>):</p>
<h5><strong>show-explorer-view-on-startup=false</strong></h5>
<p>When this option is set to <span class="inline-pre">false</span> the default solution browser is disabled and is replaced in the main content area with the old version (1.7) solution browser.</p>
<h5><strong>show-advanced-features=true</strong></h5>
<p>When this option is set to <span class="inline-pre">true</span> advanced options are enabled on the menu-bar. These advanced options include Favourite solution folders and User Preferences.</p>
<h5><strong>plugin perspectives</strong></h5>
<p>I believe this has to do with Pentaho&#8217;s BI Server new <a href="http://wiki.pentaho.com/display/ServerDoc2x/BI+Platform+Plugins+in+V2" target="_blank">plugin architecture</a> and works similar to the startup-urls option, if I set the <span class="inline-pre">num-plugin-perspectives</span> option from <span class="inline-pre">0</span> to <span class="inline-pre">2</span> the Ad hoc Reporting and Interactive Reporting items the <strong>View</strong> menu item.</p>
<h3><a name="2"></a>Change the Default logo-panel Logo</h3>
<p>To change the default logo seen on the logo-panel you will need to modify or replace the <span class="inline-pre">logo.png</span> file which is under the <span class="inline-pre">tomcat/webapps/pentaho/mantle</span> directory.</p>
<p>The new or modified <span class="inline-pre">logo.png</span> image must be:</p>
<ul>
<li>152 pixels wide</li>
<li>70 pixels high</li>
<li>A transparent .PNG image (optional)</li>
</ul>
<p>For example I would like to replace the <span class="inline-pre">logo.png</span> image with the following image:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Logo.png" alt="New logo for logo-panel" title="New logo" width="152" height="60" class="alignnone size-full wp-image-941" /></p>
<p>After replacing the <span class="inline-pre">logo.png</span> with the above image the logo-panel now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Logo_On_Logo_Panel.png" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Logo_On_Logo_Panel-300x266.png" alt="The new logo on the logo panel" title="New Logo On Logo Panel" width="300" height="266" class="alignnone size-medium wp-image-942" /></a></p>
<p>There is no need to restart your Apache-Tomcat server to reflect this change however if no change is apparent clear your browsers cache.</p>
<h3><a name="3"></a>main_toolbar.xul</h3>
<p>The main-toolbar is built using XUL mark up (XUL was created by Mozilla and you can read up more on it <a href="https://developer.mozilla.org/en/XUL" target="_blank">here</a>). At the moment only the main-toolbar uses XUL mark-up (to make modifications to the menu-bar you will need to <a href="#5c1">modify the source code</a>). The <span class="inline-pre">main_toolbar.xul</span> file is located under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/xul/</span> directory.</p>
<p>You can open the <span class="inline-pre">main_toolbar.xul</span> file with a text editor, the contents of this file look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml-stylesheet</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;chrome://global/skin/&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;window</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;275&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Placeholder&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul&quot;</span>  <span style="color: #000066;">xmlns:pen</span>=<span style="color: #ff0000;">&quot;http://www.pentaho.org/2008/xul&quot;</span> <span style="color: #000066;">onload</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.init()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbar</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainToolbar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;openButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/open_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.openClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${openEllipsis}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;newAdhocButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/new_report_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.newAdhocClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${newAdhocReport}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;newAnalysisButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/new_analysis_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/new_analysis_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.newAnalysisClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${newAnalysisView}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;editContentButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/editContent_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/editContent_32_disabled.png&quot;</span>  <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.editContentClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${editContent}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">pen:visible</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;editButtonSpacer&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">pen:visible</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/save_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/save_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.saveClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${save}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveAsButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/saveAs_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/saveAs_32_disabled.png&quot;</span>  <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.saveAsClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${saveAs}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;printButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/print_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/print_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.printClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${print}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;workspaceButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/workspace_32.png&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.workspaceClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${workspace}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;showBrowserButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/browser_show_32.png&quot;</span> <span style="color: #000066;">downimage</span>=<span style="color: #ff0000;">&quot;mantle/images/browser_hide_32.png&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.showBrowserClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${toggleSolutionBrowser}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/toolbar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/window<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Here are descriptions of the key elements and attributes which make up this file:</p>
<ul>
<li><strong>toolbarspacer</strong> : This element creates a blank space on the main toolbar
<ul>
<li>width : Is an attribute of the toolbarspacer element and defines how wide the blank space on the main toolbar is i.e. 20 is equivalent to 20 pixels wide</li>
</ul>
</li>
<li><strong>toolbarbutton</strong> : This element creates a button on the main toolbar
<ul>
<li>id : A unique identifier of the button &#8211; this is set for any JavaScript interaction</li>
<li>image : The image of the button, these images are located under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/images</span> directory</li>
<li>disabledimage : The image which is displayed when the button is disabled (this happens when you set the disabled element to <span class="inline-pre">true</span>), these images are located under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/images</span> directory</li>
<li>onclick : The function to call when the button is clicked</li>
<li>tooltiptext : The tooltip text to display when a user hovers over the button, most of these are setup in the <span class="inline-pre">messages_xx.properties</span> file (this was covered in this <a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-2" target="_blank">post</a>)</li>
<li>downimage : The image which is displayed when the button is toggled</li>
<li>type : The button type &#8211; for example if the button is a toggle button</li>
<li>disabled : When this option is set to <span class="inline-pre">true</span> the button will be disabled and the <span class="inline-pre">disabledimage</span> image will be displayed</li>
</ul>
</li>
</ul>
<p>The image below describes how the above mark up contributes to the main-toolbar:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Toolbar_Structure.jpg" alt="The structure of the main toolbar and code" title="Main Toolbar Structure" width="455" height="95" class="alignnone size-full wp-image-944" /></p>
<h4><strong><a name="3a"></a>Show/Hide Buttons on the main-toolbar</strong></h4>
<p>In this example I would like to remove a spacer, New Adhoc Report and New Analysis buttons from the main-toolbar, you can do this by deleting or commenting out lines from the <span class="inline-pre">main_toolbar.xul</span> file (I will be removing the lines). The lines of code which I will to need remove are:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;newAdhocButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/new_report_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.newAdhocClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${newAdhocReport}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;newAnalysisButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/new_analysis_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/new_analysis_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToo</span></span></pre></div></div>

<p>After making the changes the <span class="inline-pre">main_toolbar.xul</span> file now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml-stylesheet</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;chrome://global/skin/&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;window</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;275&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Placeholder&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul&quot;</span>  <span style="color: #000066;">xmlns:pen</span>=<span style="color: #ff0000;">&quot;http://www.pentaho.org/2008/xul&quot;</span> <span style="color: #000066;">onload</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.init()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbar</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainToolbar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;openButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/open_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.openClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${openEllipsis}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;editContentButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/editContent_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/editContent_32_disabled.png&quot;</span>  <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.editContentClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${editContent}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">pen:visible</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;editButtonSpacer&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">pen:visible</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/save_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/save_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.saveClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${save}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveAsButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/saveAs_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/saveAs_32_disabled.png&quot;</span>  <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.saveAsClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${saveAs}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;printButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/print_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/print_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.printClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${print}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;workspaceButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/workspace_32.png&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.workspaceClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${workspace}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;showBrowserButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/browser_show_32.png&quot;</span> <span style="color: #000066;">downimage</span>=<span style="color: #ff0000;">&quot;mantle/images/browser_hide_32.png&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.showBrowserClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${toggleSolutionBrowser}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/toolbar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/window<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Save the <span class="inline-pre">main_toolbar.xul</span> file, restart your Apache-Tomcat server and clear your browsers cache. The main-toolbar now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Main_Toolbar.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Main_Toolbar-300x266.jpg" alt="Buttons removed from the main toolbar" title="New Main Toolbar" width="300" height="266" class="alignnone size-medium wp-image-945" /></a></p>
<h3><a name="5"></a>Modifying the Source Code</h3>
<p><strong>The following section assumes that you have experience in Java, Subversion and the Eclipse IDE.</strong></p>
<h4><strong><a name="5a"></a>Requirements</strong></h4>
<p><em>Some of the excerpts below have been taken from this <a href="http://wiki.pentaho.com/display/ServerDoc2x/01.+Setting+Up+Your+Environment+in+2.0" target="_blank">wiki</a> entry.</em></p>
<p>Before you get started you must have the following tools installed:</p>
<ul>
<li><a href="http://www.eclipse.org/" target="_blank">Eclipse IDE</a></li>
<li><a href="http://ant.apache.org/" target="_blank">Ant</a></li>
<li><a href="http://ant.apache.org/ivy/ivyde/" target="_blank">IvyDE</a></li>
<li><a href="http://subclipse.tigris.org/" target="_blank">Subclipse</a></li>
</ul>
<h5><strong>Eclipse IDE</strong></h5>
<blockquote><p>The Eclipse platform is the IDE of choice at Pentaho</p></blockquote>
<p>To download the latest version of the Eclipse IDE for your operating system click <a href="http://www.eclipse.org/downloads/" target="_blank">here</a> &#8211; I use the <em>Eclipse IDE for Java Developers</em> version.</p>
<p>If you are using Windows there is no installation package or wizard so extract the file to a working location i.e. <span class="inline-pre">C:\eclipse</span>. If you are using a Linux workstation i.e. Ubuntu or Fedora you should be able to use the software package managers to install the Eclipse IDE.</p>
<p>The first time you start up Eclipse you will be prompted to set your default Workspace &#8211; this is where you will be checking out all the required folders to build the Pentaho BI Server.</p>
<h5><strong>Ant</strong></h5>
<blockquote><p>Ant is a Java-based build tool that Pentaho uses to build the server platform, among other projects</p></blockquote>
<p>By default Apache Ant is pre-packaged with Eclipse IDE but if you would like to install/setup Apache Ant manually follow the guide posted on this <a href="http://wiki.pentaho.com/display/ServerDoc2x/01.+Setting+Up+Your+Environment+in+2.0" target="_blank">wiki</a> entry.</p>
<h5><strong>IvyDE</strong></h5>
<blockquote><p>IvyDE is an IDE that lets you manage your dependencies declared in an ivy.xml file in your Java Eclipse projects</p></blockquote>
<p>To install IvyDE click on this <a href="http://wiki.pentaho.com/download/attachments/8815995/org.apache.ivyde.feature-2.0.0.alpha1-pentaho-200808281007-with-ivy.zip?version=1" target="_blank">link</a>. Once the file has downloaded extract its contents to your Eclipse home directory i.e. <span class="inline-pre">C:\eclipse</span>, it will extract files into the <span class="inline-pre">features/</span> and <span class="inline-pre">plugins/</span> directories.</p>
<p>For more detailed instructions or if you already have a version of IvyDE installed click <a href="http://wiki.pentaho.com/display/PEOpen/Installing+ivyDE" target="_blank">here</a>.</p>
<h5><strong>Subclipse</strong></h5>
<blockquote><p>Subclipse is an Eclipse plugin that enables Subversion access from within the Eclipse environment</p></blockquote>
<p>To install Subclipse follow the instructions on this <a href="http://wiki.pentaho.com/display/ServerDoc2x/01.+Setting+Up+Your+Environment+in+2.0" target="_blank">wiki</a> entry.</p>
<p>You can also install Subclipse manually by downloading the latest version <a href="http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240" target="_blank">here</a> (the latest version at the time of writing this was 1.6.8) and extracting its contents to your Eclipse home directory i.e. <span class="inline-pre">C:\eclipse</span>, it will extract files into the <span class="inline-pre">features/</span> and <span class="inline-pre">plugins/</span> directories.</p>
<p>The next step is to configure Eclipse to use Subclipse for all SVN related tasks. Once you have installed Subclipse start Eclipse and click on the <strong>Windows</strong> &gt; <strong>Preferences</strong> option to display the <strong>Preferences</strong> window. Expand the <strong>Team</strong> item from left frame and click the <strong>SVN</strong> option. In the right frame make sure the <strong>SVN Interface</strong> is set to <span class="inline-pre">SVNKit (Pure Java) SVNKit &#8230;</span> and click the <strong>OK</strong> button.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/SVN_Interface.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/SVN_Interface-273x300.jpg" alt="SVN interface option set to SVNKit Pure Java" title="SVN Interface Option" width="273" height="300" class="alignnone size-medium wp-image-948" /></a></p>
<h4><strong><a name="5b"></a>Checking out the Source Code</strong></h4>
<h5><strong>Create a New Project</strong></h5>
<p>The first step before you start to check out any code is to create a new project. Start up Eclipse and click on <strong>File</strong> &gt; <strong>New</strong> &gt; <strong>Project</strong> option from the menu bar:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Project.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Project-300x84.jpg" alt="Create a new project" title="New Project" width="300" height="84" class="alignnone size-medium wp-image-949" /></a></p>
<p>This will launch a <strong>New project</strong> wizard. Expand the <strong>General</strong> folder and select the <strong>Project</strong> option and click the <strong>Next &gt;</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Project_Wizard.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/New_Project_Wizard-300x300.jpg" alt="The new project wizard will launch" title="New Project Wizard" width="300" height="300" class="alignnone size-medium wp-image-950" /></a></p>
<p>The next window will ask you to setup your <strong>Project resource</strong>. Enter <span class="inline-pre">pentaho</span> for the <strong>Project name</strong> and leave the <strong>Use default location</strong> check box checked and click the <strong>Finish</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Project_Name_pentaho.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Project_Name_pentaho-300x300.jpg" alt="New project name titled pentaho" title="Project Name Pentaho" width="300" height="300" class="alignnone size-medium wp-image-951" /></a></p>
<p>You should now be able to see the project <span class="inline-pre">pentaho</span> under the <strong>Package Explorer</strong> tab:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/pentaho_Project_Visible.jpg" alt="pentaho project visible under the package explorer tab" title="pentaho Project Visible" width="257" height="164" class="alignnone size-full wp-image-952" /> </p>
<h5><strong><a name="5b1"></a>Checkout All Necessary Folders</strong></h5>
<p>The next step is to checkout all the folders which are required to build the Pentaho BI Server from source. You will need to checkout these 4 folders:</p>
<ul>
<li>svn://source.pentaho.org/svnroot/bi-platform-v2/tags/3.5.0-GA</li>
<li>svn://source.pentaho.org/svnroot/legacy/pentaho-xul/trunk</li>
<li>svn://source.pentaho.org/svnroot/pentaho-commons/pentaho-gwt-modules/trunk</li>
<li>svn://source.pentaho.org/svnroot/pentaho-open-admin-console/tags/3.5.0-GA</li>
</ul>
<p>You can browse the repository with your browser by visiting this URL: <a href="http://source.pentaho.org/svnroot/" target="_blank">http://source.pentaho.org/svnroot/</a>.</p>
<div class="notice">
<p>I have tested this with version 3.5.2 so if you are running 3.5.2 use the following 5 folders:</p>
<ul class="bottom">
<li>svn://source.pentaho.org/svnroot/bi-platform-v2/tags/3.5.2.stable</li>
<li>svn://source.pentaho.org/svnroot/legacy/pentaho-xul/trunk</li>
<li>svn://source.pentaho.org/svnroot/pentaho-commons/pentaho-gwt-modules/trunk</li>
<li>svn://source.pentaho.org/svnroot/pentaho-open-admin-console/tags/3.5.2.stable</li>
</ul>
</div>
<p>You will need to repeat the steps seen below for each folder, I have used the first folder as an example (<span class="inline-pre">3.5.0-GA</span>).</p>
<p>The first step is to import the <span class="inline-pre">svn://source.pentaho.org/svnroot/bi-platform-v2/tags/3.5.0-GA</span> (<span class="inline-pre">bi-platform-v2/tags/3.5.0-GA</span>) into the <span class="inline-pre">pentaho</span> project which we created earlier. Right click on the <span class="inline-pre">pentaho</span> project under the <strong>Package Explorer</strong> tab and click on the <strong>Import&#8230;</strong> option:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Import_Folder.jpg" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Import_Folder-280x300.jpg" alt="Right click on pentaho and click the Import... option" title="Import_Folder" width="280" height="300" class="alignnone size-medium wp-image-976" /></a></p>
<p>An <strong>Import</strong> window will appear asking you for the source of the import, expand the <strong>SVN</strong> folder and click the <strong>Checkout Projects from SVN</strong> option and click the <strong>Next &gt;</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Import_Project_From_SVN.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Import_Project_From_SVN-256x300.jpg" alt="Import a SVN project" title="Import Project From SVN" width="256" height="300" class="alignnone size-medium wp-image-958" /></a></p>
<p>The next window will ask you if you would like to <strong>Create a new repository location</strong> or <strong>Use existing repository location</strong>, click the <strong>Create a new repository location</strong> option and click the <strong>Next &gt;</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Create_New_Location.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Create_New_Location-272x300.jpg" alt="Create a new repository location" title="Create a New Repository Location" width="272" height="300" class="alignnone size-medium wp-image-959" /></a></p>
<p>The next window will ask you the location of the repository, enter in the <strong>URL</strong> for the folder if you are doing this for the first time enter <span class="inline-pre">svn://source.pentaho.org/svnroot/bi-platform-v2/tags/3.5.0-GA</span> as the URL and click the <strong>Next &gt;</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/SVN_Location.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/SVN_Location-272x300.jpg" alt="The URL of the SVN location to be checked out" title="SVN Location" width="272" height="300" class="alignnone size-medium wp-image-969" /></a></p>
<p>The next window will ask you which folder you would like to check out, as you need all folders under each listed URL &#8211; select the root folder which in this example can be seen listed as <span class="inline-pre">svn://source.pentaho.org/svnroot/bi-platform-v2/tags/3.5.0-GA</span> and click the <strong>Next &gt;</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Select_A_Folder_Repo.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Select_A_Folder_Repo-272x300.jpg" alt="" title="Select_A_Folder_Repo" width="272" height="300" class="alignleft size-medium wp-image-962" /></a></p>
<p>The next window will ask you how you want to check out the folder. Click on the <strong>Check out as a project in the workspace</strong> option and leave the <strong>Project name</strong> to the populated name, leave the rest of the options to the defaults and click the <strong>Next &gt;</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/check_out_as_svn.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/check_out_as_svn-272x300.jpg" alt="Check out the SVN folder with the default name" title="Check Out As SVN Folder" width="272" height="300" class="alignnone size-medium wp-image-967" /></a></p>
<p>The last window will ask you where you would like to check out the folder to, uncheck the <strong>Use the default workspace location</strong> option and make sure the <strong>Location</strong> points to the <span class="inline-pre">pentaho</span> project&#8217;s folder under your workspace i.e. <span class="inline-pre">C:\Users\prashant\workspace\pentaho\3.5.2.stable\mantle\dist</span> then click the <strong>Finish</strong> button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/SVN_URL.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/SVN_URL-272x300.jpg" alt="The location under your workspace to place the checked out project" title="Place Check Out Files" width="272" height="300" class="alignnone size-medium wp-image-960" /></a></p>
<p>After the checking out is complete (it may take a while depending on your internet connection) you will see the project listed under the <span class="inline-pre">pentaho/</span>project on the <strong>Package explorer</strong> tab:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/pentaho_project_listed.jpg" alt="The 3.5.0-GA folder checked out" title="Pentaho Projects Listed" width="252" height="254" class="alignnone size-full wp-image-970" /></p>
<p>Repeat the above <a href="#5b1"></a>steps for the next 3 URLs, after you have completed this you should now see the following projects under your <span class="inline-pre">pentaho</span> project on the <strong>Package explorer</strong> tab:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/All_Folders_Checked_Out.jpg" alt="All folders checked out under the pentaho project" title="All Folders Checked Out" width="252" height="299" class="alignnone size-full wp-image-971" /></p>
<p>While you are checking out folders IvyDE will automatically retrieve any dependencies which the source code needs &#8211; this may take a while as it downloads packages etc. so just keep an eye on the bottom right hand corner to make sure that all the dependencies have downloaded for all the folders you have checked out:</p>
<p><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Resolve_Dependencies.jpg" alt="Resolve Dependencies" title="Resolve Dependencies" width="284" height="44" class="alignnone size-full wp-image-972" /></p>
<p>Now you are ready to start modifying the source code.</p>
<h3><a name="5c"></a>Examples</h3>
<p>As you can almost do anything when modifying the source code I decided to keep the examples to minor changes to the PUC user interface &#8211; hopefully these examples can give you a head start with any modifications you need to do.</p>
<h4><strong><a name="5c1"></a>Show/Hide menu-bar Items</strong></h4>
<p>To change the items which are appear on the menu-bar you will need to edit the <span class="inline-pre">MantleApplication.java</span> file within Eclipse, this file is located under the <span class="inline-pre">pentaho/3.5.0-GA/mantle/org/pentaho/mantle/client/</span> directory (<strong>pentaho</strong> is the name of the project).</p>
<p>To understand how menu items are added to the menu bar below is a high level breakdown of the code.</p>
<p>The following piece of code:</p>
<ol>
<li>Creates the <strong>Save</strong> menu item</li>
<li>Assigns the save message defined in the <span class="inline-pre"><a href="http://www.prashantraju.com/tutorials/customising-the-pentaho-user-console-part-2/" target="_blank">messages_xx.properties</a> file</span></li>
<li>Assigns the <span class="inline-pre">SaveCommand</span> function to the <strong>Save</strong> menu item</li>
<li>Assigns <span class="inline-pre">save</span> as an element id</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">saveMenuItem <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PentahoMenuItem<span style="color: #009900;">&#40;</span>Messages.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;save&quot;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> SaveCommand<span style="color: #009900;">&#40;</span>solutionBrowserPerspective, <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span>
saveMenuItem.<span style="color: #006633;">getElement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setId</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;save&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The following piece of code:</p>
<ol>
<li>Adds the <strong>Save</strong> menu item to the <strong>File</strong> menu item</li>
<li>Adds a separator (horizontal bar) to the <strong>File</strong> menu</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">fileMenu.<span style="color: #006633;">addItem</span><span style="color: #009900;">&#40;</span>saveMenuItem<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
fileMenu.<span style="color: #006633;">addSeparator</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In this example I want to hide the <strong>Help</strong> menu item, to do this you will need to comment out the following line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">menuBar.<span style="color: #006633;">addItem</span><span style="color: #009900;">&#40;</span>helpMenuBar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After commenting the above line looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//menuBar.addItem(helpMenuBar);</span></pre></div></div>

<p class="notice">If you were going to make this change permanent I would suggest you remove all instances of the <strong>Help</strong> menu item and sub items.</p>
<p>Save the file and <a href="#5d">rebuild the pentaho project</a> and copy over the new directories and files, after this is complete the new menu-bar now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/No_Help_Menu_Item.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/No_Help_Menu_Item-300x217.jpg" alt="No Help Menu Item" title="No Help Menu Item" width="300" height="217" class="alignnone size-medium wp-image-1029" /></a></p>
<p>Another example is if I wanted to remove the following menu items (which are part of the <strong>File</strong> menu item):</p>
<ul>
<li>File
<ul>
<li>New (remove including sub items)</li>
<li>&#8212; (remove)</li>
<li>Save (remove)</li>
<li>Save As&#8230; (remove)</li>
<li>&#8212; (remove)</li>
</ul>
</li>
</ul>
<p>First locate the following lines of code within the <span class="inline-pre">MantleApplication.java</span> file:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">fileMenu.<span style="color: #006633;">addItem</span><span style="color: #009900;">&#40;</span>newMenuBar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
...
<span style="color: #006633;">fileMenu</span>.<span style="color: #006633;">addSeparator</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
fileMenu.<span style="color: #006633;">addItem</span><span style="color: #009900;">&#40;</span>saveMenuItem<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
fileMenu.<span style="color: #006633;">addItem</span><span style="color: #009900;">&#40;</span>saveAsMenuItem<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
fileMenu.<span style="color: #006633;">addSeparator</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After commenting out the above lines of code they now look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//fileMenu.addItem(newMenuBar);</span>
...
<span style="color: #666666; font-style: italic;">//fileMenu.addSeparator();</span>
<span style="color: #666666; font-style: italic;">//fileMenu.addItem(saveMenuItem);</span>
<span style="color: #666666; font-style: italic;">//fileMenu.addItem(saveAsMenuItem);</span>
<span style="color: #666666; font-style: italic;">//fileMenu.addSeparator();</span></pre></div></div>

<p class="notice">If you were going to make this change permanent I would suggest you remove all instances of these menu items and sub items.</p>
<p>Save the file and <a href="#5d">rebuild the pentaho project</a>, after this is complete the new menu-bar now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Modify_Source_2nd_Ex.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Modify_Source_2nd_Ex-300x217.jpg" alt="Modify the Source Code Example 2" title="Modify the Source Code Example 2" width="300" height="217" class="alignnone size-medium wp-image-1019" /></a></p>
<h4><strong><a name="5c2"></a>Change the URL of the logo-panel</strong></h4>
<p>To change the URL which the logo-panel points to you will need to edit the <span class="inline-pre">MantleApplication.java</span> file in Eclipse which is located under the <span class="inline-pre">pentaho/3.5.0-GA/mantle/org/pentaho/mantle/client/</span> directory (<strong>pentaho</strong> is the name of the project). First locate this line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">logoPanel <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> LogoPanel<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.pentaho.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span></pre></div></div>

<p>At the moment it is pointing to Pentaho&#8217;s homepage, in this example I would like to have the URL point to my blog&#8217;s homepage, the line of code now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">logoPanel <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> LogoPanel<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.prashantraju.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//$NON-NLS-1$</span></pre></div></div>

<p>Save the file and <a href="#5d">rebuild the pentaho project</a>, after this is complete when a user clicks on the logo-panel they are directed to my blog&#8217;s homepage:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Modify_Source_3rd_Ex.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Modify_Source_3rd_Ex-300x225.jpg" alt="Modify Source Code Example 3" title="Modify Source Code Example 3" width="300" height="225" class="alignnone size-medium wp-image-1020" /></a></p>
<h4><strong><a name="5c3"></a>Add a Logout Button to the main-toolbar</strong></h4>
<p>To add a logout button to the main-toolbar you will need to first create a function which you will be able to call from the <span class="inline-pre">main_toolbar.xul</span> file. Open the <span class="inline-pre">MainToolbarController.java</span> file in Eclipse which is located under the <span class="inline-pre">pentaho/3.5.0-GA/mantle/org/pentaho/mantle/client/toolbars/</span> directory.</p>
<p>The next step is to import the <span class="inline-pre">commands/LogoutCommand.java</span> file, to do this add the following line to the header of the <span class="inline-pre">MainToolbarController.java</span> file where the other imports are located:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.mantle.client.commands.LogoutCommand</span><span style="color: #339933;">;</span></pre></div></div>

<p>The header section of the <span class="inline-pre">MainToolbarController.java</span> file now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">org.pentaho.mantle.client.toolbars</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.ArrayList</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.List</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.mantle.client.commands.ShowBrowserCommand</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.mantle.client.commands.ToggleWorkspaceCommand</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.mantle.client.commands.LogoutCommand</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.mantle.client.perspective.solutionbrowser.SolutionBrowserPerspective</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.ui.xul.EventMethod</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.ui.xul.binding.BindingFactory</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.ui.xul.components.XulToolbarbutton</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.ui.xul.gwt.binding.GwtBindingFactory</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.ui.xul.impl.AbstractXulEventHandler</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.pentaho.ui.xul.stereotype.Bindable</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">com.google.gwt.core.client.JavaScriptObject</span><span style="color: #339933;">;</span>
...</pre></div></div>

<p>The second step is to add the following function, <span class="inline-pre">logoutClicked()</span> to the <span class="inline-pre">AbstractXulEventHandler()</span> function, locate the following section of code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Bindable
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> showBrowserClicked<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  ShowBrowserCommand showBrowserCommand <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ShowBrowserCommand<span style="color: #009900;">&#40;</span>solutionBrowser<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  showBrowserCommand.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  model.<span style="color: #006633;">setShowBrowserSelected</span><span style="color: #009900;">&#40;</span>solutionBrowser.<span style="color: #006633;">isExplorerViewShowing</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Underneath the above section of code copy and paste the following function:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Bindable
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> logoutClicked<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 LogoutCommand logoutCommand <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> LogoutCommand<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 logoutCommand.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Save the file and <a href="#5d">rebuild the pentaho project</a> and copy over the new directories and files. You will now need to make changes to the <span class="inline-pre">main_toolbar.xul</span> file which is located under the <span class="inline-pre">tomcat/webapps/pentaho/mantle/xul/</span> directory. Open up the file in a text editor and add the following line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;logoutButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/home_back_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.logoutClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${logout}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<ul>
<li><strong>toolbarspacer</strong> : Add a space of 10 pixels between the logout button and the solution browser toggle button</li>
<li><strong>id</strong> : A unique identifier for the button (optional) i.e. logoutButton</li>
<li><strong>image</strong> : The image which will be displayed for the logout button &#8211; I used this <img src="http://www.prashantraju.com/wp-content/uploads/2010/03/home_back_32.png" alt="Logout" title="home_back_32" width="32" height="32" class="alignnone size-full wp-image-1022" /> (<a href="http://www.woothemes.com/2009/09/woofunction-178-amazing-web-design-icons/" target="_blank">WooFunction Icons released under GNU GPL</a>)</li>
<li><strong>onclick</strong> : The function to call when the logout button is clicked &#8211; this is the function we created in the previous step <span class="inline-pre">logoutClicked()</span>, this <strong>must</strong> be part of the <span class="inline-pre">mainToolbarHandler</span></li>
<li><strong>tooltiptext</strong> : The tooltip which is displayed when the user hovers over the logout button &#8211; in this case there is already a logout message defined so I have reused this</li>
</ul>
<p>The <span class="inline-pre">main_toolbar.xul</span> file now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml-stylesheet</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;chrome://global/skin/&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;window</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;275&quot;</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Placeholder&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul&quot;</span>  <span style="color: #000066;">xmlns:pen</span>=<span style="color: #ff0000;">&quot;http://www.pentaho.org/2008/xul&quot;</span> <span style="color: #000066;">onload</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.init()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbar</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;mainToolbar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;openButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/open_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.openClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${openEllipsis}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;newAdhocButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/new_report_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.newAdhocClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${newAdhocReport}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;newAnalysisButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/new_analysis_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/new_analysis_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.newAnalysisClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${newAnalysisView}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;editContentButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/editContent_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/editContent_32_disabled.png&quot;</span>  <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.editContentClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${editContent}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">pen:visible</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;editButtonSpacer&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #000066;">pen:visible</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/save_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/save_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.saveClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${save}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveAsButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/saveAs_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/saveAs_32_disabled.png&quot;</span>  <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.saveAsClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${saveAs}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;printButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/print_32.png&quot;</span> <span style="color: #000066;">disabledimage</span>=<span style="color: #ff0000;">&quot;mantle/images/print_32_disabled.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.printClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${print}&quot;</span> <span style="color: #000066;">disabled</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;workspaceButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/workspace_32.png&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.workspaceClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${workspace}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;showBrowserButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/browser_show_32.png&quot;</span> <span style="color: #000066;">downimage</span>=<span style="color: #ff0000;">&quot;mantle/images/browser_hide_32.png&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;toggle&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.showBrowserClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${toggleSolutionBrowser}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarspacer</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;toolbarbutton</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;logoutButton&quot;</span> <span style="color: #000066;">image</span>=<span style="color: #ff0000;">&quot;mantle/images/logout_32.png&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">&quot;mainToolbarHandler.logoutClicked()&quot;</span> <span style="color: #000066;">tooltiptext</span>=<span style="color: #ff0000;">&quot;${logout}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/toolbar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/window<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Restart your Apache-Tomcat server and clear your browsers cache. The main-toolbar now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Modify_Source_4th_Ex.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Modify_Source_4th_Ex-300x225.jpg" alt="Modify Source Code for Logout Button" title="Modify Source Code for Logout Button" width="300" height="225" class="alignnone size-medium wp-image-1025" /></a></p>
<p>When a User clicks on the Logout button they are logged out from the PUC.</p>
<h3><a name="5d"></a>Building the Source Code</h3>
<p>To build the modified source code you will need to use Ant, as I mentioned early Ant comes packaged with Eclipse which makes it a lot easier to use. To start the build process right click on the <span class="inline-pre">build.xml</span> file under the <span class="inline-pre">pentaho/3.5.0-GA/bi-platform-build/</span> directory and click the <strong>Run As</strong> &gt; <strong>1 Ant Build</strong> option:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/run_ant_build.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/run_ant_build-300x278.jpg" alt="Run as &gt; 1 Ant Build" title="Run As Ant Build" width="300" height="278" class="alignnone size-medium wp-image-974" /></a></p>
<p>After clicking the <strong>1 Ant Build</strong> option Eclipse will start the build process, you can monitor the build progress from the <strong>Output</strong> tab:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/03/Output_Tab.jpg" target="_blank" target="_blank"><img src="http://www.prashantraju.com/wp-content/uploads/2010/03/Output_Tab-300x81.jpg" alt="Output Tab" title="Output Tab" width="300" height="81" class="alignnone size-medium wp-image-984" /></a></p>
<p>The following message will be displayed in the <strong>Output</strong> tab when the build process has completed successfully:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">BUILD SUCCESSFUL
Total time: 10 minutes 4 seconds</pre></div></div>

<p class="notice">It can take over 20 minutes to build the source code for the first time and consequent builds can take between 5 to 15 minutes &#8211; this depends on your system setup, internet connection etc.</p>
<p>Once the build process has finished you will need to copy the following directories and file over to your Pentaho BI Server installation:</p>
<ul>
<li>mantle/</li>
<li>mantleLogin/</li>
<li>mantle-3.5.0.stable.jar</li>
</ul>
<p>These directories and files are found under the <span class="inline-pre">pentaho/3.5.0-GA/mantle/dist/</span> directory. Before you copy these files over make sure you stop your Apache-Tomcat server and rename the current <span class="inline-pre">mantle/</span>, <span class="inline-pre">mantleLogin/</span> and <span class="inline-pre">mantle-3.5.0.stable.jar</span> so that they don&#8217;t cause any conflicts, in this example I renamed them to <span class="inline-pre">mantle.old/</span>, <span class="inline-pre">mantleLogin.old/</span> and <span class="inline-pre">mantle-3.5.0.stable.old.jar</span>.</p>
<p>The new <span class="inline-pre">mantle/</span>, <span class="inline-pre">mantleLogin/</span> directories are inside the <span class="inline-pre">mantle-package-3.5-SNAPSHOT.zip</span> file, extract the contents of this file into the <span class="inline-pre">tomcat/webapps/pentaho/</span> directory.<br />
The new <span class="inline-pre">mantle.3.5.0.stable.jar</span> file is also under the same directory but is named <span class="inline-pre">mantle-3.5-SNAPSHOT.jar</span>, rename this file to <span class="inline-pre">mantle-3.5.0.stable.jar</span> and copy it to the <span class="inline-pre">tomcat/webapps/pentaho/WEB-INF/lib/</span> directory.</p>
<p>After you have extracted and copied the new directories and file your <span class="inline-pre">tomcat/webapps/pentaho/</span> directory structure should now look like this:</p>
<ul>
<li>tomcat/webapps/pentaho/
<ul>
<li>mantle/</li>
<li>mantle.old/</li>
<li>mantleLogin/</li>
<li>mantleLogin.old/</li>
<li>WEB-INF/
<ul>
<li>lib/
<ul>
<li>mantle-3.5.0.stable.jar</li>
<li>mantle-3.5.0.stable.old.jar</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p class="error"><strong>Do not</strong> overwrite original directories and files!</p>
<p class="notice">If you are using a more recent version of Pentaho BI Server i.e. 3.5.2 the .JAR file will have a different name i.e. <span class="inline-pre">mantle-3.5.2.stable.jar</p>
<p>Start your Apache-Tomcat server, clear your browsers cache and view the modifications you have made to source code.</p>
<h3>Final Notes</h3>
<p>I didn&#8217;t try and go into too much detail with the &#8220;<a href="#5">Modifying the Source Code</a>&#8221; section as I could of have written a whole book on it! Hopefully the examples I have provided give you a bit of a kick start with any modifications you need to make to customise the PUC user interface however the best way to learn is by trial and error. This is the approach I took and I have never touched Java before I started using Pentaho!</p>
<p>Good luck and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/03/customising-the-pentaho-user-console-part-3/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>Creating Cascade Parameters with Pentaho Report Designer 3.5.</title>
		<link>http://www.prashantraju.com/2010/02/creating-cascade-parameters-with-pentaho-report-designer-3-5/</link>
		<comments>http://www.prashantraju.com/2010/02/creating-cascade-parameters-with-pentaho-report-designer-3-5/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 14:05:00 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Report Designer]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=878</guid>
		<description><![CDATA[Cascade parameters provide a way of managing large amounts of data in reports. You can define a set of related parameters so that the list of values for one parameter depends on the value chosen in another parameter. In this example I will be using the Steel Wheels sample data to create a report which [...]]]></description>
			<content:encoded><![CDATA[<p>Cascade parameters provide a way of managing large amounts of data in reports. You can define a set of related parameters so that the list of  values for one parameter depends on the value chosen in another  parameter.</p>
<p>In this example I will be using the Steel Wheels sample data to create a report which will display a list of customers using two parameters: a drop down parameter which will contain a distinct list of countries which will then filter another drop down parameter which contains cities which belong to the country.</p>
<p><span id="more-878"></span></p>
<h3>The Scenario</h3>
<p>The current report displays customers information (includes the customer number, name, city and country). I would like to create parameters which will enable users to filter the list of customers by a country and then the cities which belong to that country.</p>
<p>Below is a screen shot of my initial report structure and preview screen:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/02/no_param_report_preview.jpg" target="_blank"><img class="alignnone size-medium wp-image-1325" title="Report Preview before Parameters" src="http://www.prashantraju.com/wp-content/uploads/2010/02/no_param_report_preview-300x181.jpg" alt="Report Preview before Parameters" width="300" height="181" /></a></p>
<h3>Step 1. Build the Parameter Queries</h3>
<p>I will need to build two parameter queries, the first will need to display a distinct list of countries and the second will need to display a distinct list of cities which belong to the country.</p>
<p>To get started I will need to add a new query to the data source  which I created to connect to the sample data, from the screen shot below  you can see I already have a query named <span class="inline-pre">customerList</span> which the current report uses to display customer information.</p>
<p>To create a new query click on the <img title="Plus Icon" src="../wp-content/uploads/2010/01/plus_icon.jpg" alt="Add a new query icon" width="15" height="15" /> icon (add a new  query) and enter a SQL statement which will retrieve a distinct list of  countries – make sure you don’t forget to name your query (in this example my country parameter query is named <span class="inline-pre">countryList</span>):</p>
<p><img class="alignnone size-full wp-image-1327" title="countryList Parameter Query Built" src="http://www.prashantraju.com/wp-content/uploads/2010/02/countryList_query_built.jpg" alt="countryList Parameter Query Built" width="371" height="287" /></p>
<p>Here is the above query in a format which you can copy and paste:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family: monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>
 <span style="color: #993333; font-weight: bold;">DISTINCT</span> <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`COUNTRY`</span>
<span style="color: #993333; font-weight: bold;">FROM</span>
 <span style="color: #ff0000;">`customers`</span></pre>
</div>
</div>
<p>The next step is to preview the query – as you can see from the screen shot below the <span class="inline-pre">countryList</span> parameter query is retrieving a distinct list of countries:</p>
<p><img class="alignnone size-full wp-image-1326" title="Distinct list of Countries" src="http://www.prashantraju.com/wp-content/uploads/2010/02/country_preview.jpg" alt="Distinct list of Countries" width="238" height="362" /></p>
<p>Now we will need to add the second parameter which will display a distinct list of cities based on the value of the country parameter. Close the preview window and click on the <img title="Plus Icon" src="../wp-content/uploads/2010/01/plus_icon.jpg" alt="Add a new query icon" width="15" height="15" /> icon (add a new   query) and enter a SQL statement which will retrieve a distinct list of cities – make sure you don’t forget to name your query (in this example my city parameter query is named <span class="inline-pre">cityList</span>):</p>
<p><img class="alignnone size-full wp-image-1328" title="cityList Query Built" src="http://www.prashantraju.com/wp-content/uploads/2010/02/cityList_query_built.jpg" alt="cityList Query Built" width="371" height="287" /></p>
<p>Here is the above query in a format which you can copy and paste:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family: monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>
 <span style="color: #993333; font-weight: bold;">DISTINCT</span> <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`CITY`</span>

<span style="color: #993333; font-weight: bold;">FROM</span>
 <span style="color: #ff0000;">`customers`</span></pre>
</div>
</div>
<p>Preview this query. At the moment the above query is only retrieving a distinct list of every city. I need to make sure that this query retrieves a list of cities based on the country parameter:</p>
<p><img class="alignnone size-full wp-image-1329" title="City Preview" src="http://www.prashantraju.com/wp-content/uploads/2010/02/city_preview.jpg" alt="City Preview" width="237" height="310" /></p>
<p>For this query to only show a list of cities based on the value of the country parameter I will  need to add the country parameter name to the <span class="inline-pre">WHERE</span> clause of the <span class="inline-pre">cityList</span> query. As I have not yet created the country or city parameters I will need to make note of the country parameter name I will be specifying in the <span class="inline-pre">cityList</span> query – I have chosen to call the country parameter <span class="inline-pre">sCountryName</span>. The new <span class="inline-pre">cityList</span> query now looks like this:</p>
<p><img class="alignnone size-full wp-image-1330" title="cityList Query Modified" src="http://www.prashantraju.com/wp-content/uploads/2010/02/cityList_query_built_final.jpg" alt="cityList Query Modified" width="548" height="455" /></p>
<p>Here is the above query in a format which you can copy and paste:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family: monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>
 <span style="color: #993333; font-weight: bold;">DISTINCT</span> <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`CITY`</span>
<span style="color: #993333; font-weight: bold;">FROM</span>
 <span style="color: #ff0000;">`customers`</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`COUNTRY`</span> <span style="color: #66cc66;">=</span> $<span style="color: #66cc66;">{</span>sCountryName<span style="color: #66cc66;">}</span></pre>
</div>
</div>
<p>I have now created both parameter queries – I will need to revisit this area later on to modify the report query <span class="inline-pre">customerList</span> but for now click on the OK button to close the <span class="inline-pre">JDBC Data Source window</span>.</p>
<h3>Step 2. Create the Parameters</h3>
<p>I will need to create two parameters:</p>
<ol>
<li>A country drop down parameter which is named sCountryName (step 1)</li>
<li>A city drop down parameter which will be named sCityName</li>
</ol>
<h4><strong>Creating the sCountryName Parameter</strong></h4>
<p>To create a new parameter make sure you have the <span class="inline-pre">Data</span> tab active, right click on the <span class="inline-pre">Parameters</span> menu item and select the <span class="inline-pre">Add Parameter…</span> option:</p>
<p><img class="alignnone size-full wp-image-1337" title="Add Parameter" src="http://www.prashantraju.com/wp-content/uploads/2010/02/add_parameter.jpg" alt="Add Parameter" width="305" height="175" /></p>
<p>An <span class="inline-pre">Add Parameter…</span> window will pop up. Before you make any changes to the options expand the connection folder on the left and then select the query which will populate the parameter, in this example it is the <span class="inline-pre">countryList</span> query. Below is a screen shot of all the <span class="inline-pre">sCountryName</span> parameter options completed:</p>
<p><img class="alignnone size-full wp-image-1338" title="sCountryName Options" src="http://www.prashantraju.com/wp-content/uploads/2010/02/sCountryName.jpg" alt="sCountryName Options" width="480" height="483" /></p>
<p>The options above are fairly self explanatory however here are descriptions of the most important options:</p>
<ul>
<li><strong>Name</strong>: This is the name we specified in step 1, this <strong>must </strong>match the value of this parameter we put in the <span class="inline-pre">cityList</span> <span class="inline-pre">WHERE</span> clause</li>
<li><strong>Type</strong>: The type of this parameter is a drop down</li>
<li><strong>Query</strong>: The query that will populate this parameter is the countryList query which was created in step 1</li>
<li><strong>Value </strong>and <strong>Display Name</strong>: I have set these both to the COUNTRY field as the value is the same as the output I would like displayed in the drop down parameter</li>
<li><strong>Value Type</strong>: The COUNTRY field is a string</li>
<li><strong>Mandatory</strong>: I have checked this option as a user must select a country before running the report – this also ensures that the city parameter will be populated</li>
</ul>
<p>Click the OK button to save the  <span class="inline-pre">sCountryName</span> parameter.</p>
<h4><strong>Creating the sCityName Parameter</strong></h4>
<p>The second parameter I will need to create is for the city drop down. There isn’t much different from this parameter and the <span class="inline-pre">sCountryName</span> parameter so I can copy and paste this parameter and then change some options.</p>
<p>To copy the parameter right click on the <span class="inline-pre">sCountryName</span> parameter under the <span class="inline-pre">Data</span> tab and select the <span class="inline-pre">Copy</span> option (alternatively you can use the <span class="inline-pre">CTRL+C</span> shortcut):</p>
<p><img class="alignnone size-full wp-image-1341" title="Copy sCountryName Parameter" src="http://www.prashantraju.com/wp-content/uploads/2010/02/copy_sCountryName.jpg" alt="Copy sCountryName Parameter" width="305" height="175" /></p>
<p>To paste the parameter right click on the <span class="inline-pre">Parameters…</span> item and select the <span class="inline-pre">Paste</span> option (alternatively you can use the <span class="inline-pre">CTRL+V</span> shortcut):</p>
<p><img class="alignnone size-full wp-image-1342" title="Paste sCountryName" src="http://www.prashantraju.com/wp-content/uploads/2010/02/paste_sCountryName.jpg" alt="Paste sCountryName" width="305" height="175" /></p>
<p>This will create an identical copy of the <span class="inline-pre">sCountryName</span> parameter.</p>
<p><img class="alignnone size-full wp-image-1344" title="Identical sCountryName" src="http://www.prashantraju.com/wp-content/uploads/2010/02/identical_sCountryName.jpg" alt="Identical sCountryName" width="305" height="175" /></p>
<p>Double click on the <span class="inline-pre">sCountryName</span> parameter which is located at the bottom of the <span class="inline-pre">Parameters</span> list, this will open the <span class="inline-pre">Edit Parameter…</span> window. Before you make any changes to the options expand the connection folder  on the left and then select the query which will populate this parameter,  in this example it is the <span class="inline-pre">cityList</span> query. Below is a screen shot of  all the <span class="inline-pre">sCityName</span> parameter options completed:</p>
<p><img class="alignnone size-full wp-image-1345" title="sCityName Options" src="http://www.prashantraju.com/wp-content/uploads/2010/02/sCityName_options.jpg" alt="sCityName Options" width="480" height="483" /></p>
<p>The options above are fairly self explanatory however here are  descriptions of the most important options:</p>
<ul>
<li><strong>Name: </strong>I have decided to name this parameter <span class="inline-pre">sCityName</span></li>
<li><strong>Type</strong>: The type of this parameter is a drop down</li>
<li><strong>Query</strong>: The query that will populate this parameter is the <span class="inline-pre">cityList</span> query which was created in step 1</li>
<li><strong>Value </strong>and <strong>Display Name</strong>: I have set these both to the <span class="inline-pre">CITY</span> field as the value is the same as  the output I would like displayed in the drop down parameter</li>
<li><strong>Value Type</strong>: The <span class="inline-pre">CITY</span> field is a string</li>
<li><strong>Mandatory</strong>: I have checked this option as a user must select a city before running the report</li>
</ul>
<h3>Step 3. Modify the Report Query</h3>
<p>Now that the parameters and parameter queries have been created we are now ready to modify the report query <span class="inline-pre">(customerList</span>) to use the new parameters. To modify the report query expand the data source connections under the <span class="inline-pre">Data</span> tab and double click on the report query, <span class="inline-pre">customerList</span>:</p>
<p><img class="alignnone size-full wp-image-1348" title="Modify the customerList Query" src="http://www.prashantraju.com/wp-content/uploads/2010/02/customerList_modify.jpg" alt="Modify the customerList Query" width="305" height="175" /></p>
<p>This will open the <span class="inline-pre">JDBC Data Source</span> window and automatically highlight the <span class="inline-pre">customerList</span> query:</p>
<p><img class="alignnone size-full wp-image-1350" title="customerList Query Before Modification" src="http://www.prashantraju.com/wp-content/uploads/2010/02/customerList_ready.jpg" alt="customerList Query Before Modification" width="380" height="289" /></p>
<p>To make the <span class="inline-pre">customerList</span> query use the two new parameters created in step 2 you will need to add in two new conditions to the <span class="inline-pre">WHERE</span> clause:</p>
<p><img class="alignnone size-full wp-image-1351" title="customerList Query After Modification" src="http://www.prashantraju.com/wp-content/uploads/2010/02/customerList_done.jpg" alt="customerList Query After Modification" width="380" height="338" /></p>
<p>Here is the above query in a format which you can copy and paste:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family: monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`CUSTOMERNUMBER`</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`CUSTOMERNAME`</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`CITY`</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`COUNTRY`</span>

<span style="color: #993333; font-weight: bold;">FROM</span>
 <span style="color: #ff0000;">`customers`</span>
<span style="color: #993333; font-weight: bold;">WHERE</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`COUNTRY`</span> <span style="color: #66cc66;">=</span> $<span style="color: #66cc66;">{</span>sCountryName<span style="color: #66cc66;">}</span>
<span style="color: #993333; font-weight: bold;">AND</span>
 <span style="color: #ff0000;">`customers`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`CITY`</span>    <span style="color: #66cc66;">=</span> $<span style="color: #66cc66;">{</span>sCityName<span style="color: #66cc66;">}</span></pre>
</div>
</div>
<p>Now the report query will use the values of the <span class="inline-re">sCountryName</span> and <span class="inline-re">sCityName</span> parameters in its <span class="inline-re">WHERE</span> clause. Click on the OK button to close the <span class="inline-re">JDBC Data Source</span> window.</p>
<h3>Step 4. Preview the Report</h3>
<p>The last step is to preview the report, to do this you can click on the <img title="Preview Icon" src="../wp-content/uploads/2010/01/preview_icon.jpg" alt="Preview icon" width="26" height="26" /> (preview icon) found in the top left hand corner or alternatively click on View &gt; Preview menu item.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/02/preview_report.jpg" target="_blank"><img class="alignnone size-medium wp-image-1352" title="Preview Report" src="http://www.prashantraju.com/wp-content/uploads/2010/02/preview_report-300x181.jpg" alt="Preview Report" width="300" height="181" /></a></p>
<p>By default nothing will be displayed in the report and none of the drop down parameters will be populated (if you would like a country to be set when you first run your report set a value for the <strong>Default Value</strong> option in step 2 for the <span class="inline-pre">sCountryName</span> parameter).</p>
<p>To check if the cascading parameters are working pick a country from the first drop down for example Australia:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/02/pick_australia.jpg"><img class="alignnone size-full wp-image-1353" title="Pick Australia" src="http://www.prashantraju.com/wp-content/uploads/2010/02/pick_australia.jpg" alt="Pick Australia" width="502" height="113" /></a></p>
<p>The city drop down parameter should automatically populate with the cities which belong to Australia <small>(even though I’m not sure if you would classify Glen Waverly as a city)</small>:</p>
<p><img class="alignnone size-full wp-image-1354" title="Cities Drop Down" src="http://www.prashantraju.com/wp-content/uploads/2010/02/cities_dropdown.jpg" alt="Cities Drop Down" width="502" height="172" /></p>
<p>After selecting a city i.e. Melbourne click on the UPDATE button and now the report is filtered to customers who are located in the country Australia and the city Melbourne:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/02/final_report_working.jpg" target="_blank"><img class="alignnone size-medium wp-image-1355" title="Cascading Parameters Working" src="http://www.prashantraju.com/wp-content/uploads/2010/02/final_report_working-300x181.jpg" alt="Cascading Parameters Working" width="300" height="181" /></a></p>
<h3>Downloads</h3>
<p>Below is a link to download the Pentaho Report file for this  tutorial.</p>
<table>
<tbody>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Download</th>
<th>Notes</th>
</tr>
<tr>
<td>CascadeParametersExample.prpt</td>
<td>Pentaho Report</td>
<td><a href="http://docs.google.com/leaf?id=0B9Jmocc0fj_EYzU3Yzc3OGUtZGMzMi00N2E0LThmNDItOGM3YThlM2FiZjZl&amp;hl=en" target="_blank">Download</a></td>
<td>Released 19/02/2010</td>
</tr>
</tbody>
</table>
<h3>Final Notes</h3>
<p>This was tested with PRD 3.5 and <em>should</em> work with PRD 3.6. If you are looking to eliminate the cascading feature you will need to remove the <span class="inline-pre">WHERE</span> clause from the <span class="inline-pre">cityList</span> parameter query:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/02/creating-cascade-parameters-with-pentaho-report-designer-3-5/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
