<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3010155004478818581</id><updated>2012-02-16T01:14:40.734-08:00</updated><category term='CCC'/><category term='CDA'/><category term='CDE'/><category term='Pentaho'/><category term='CTools'/><category term='CDF'/><category term='Dashboards'/><category term='BI'/><title type='text'>Rodrigo Haces</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rhaces.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3010155004478818581/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://rhaces.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rodrigo Haces</name><uri>http://www.blogger.com/profile/06360665053839897264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3010155004478818581.post-4875607522747713558</id><published>2011-08-30T20:59:00.000-07:00</published><updated>2011-08-31T08:27:55.620-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dashboards'/><category scheme='http://www.blogger.com/atom/ns#' term='CDE'/><category scheme='http://www.blogger.com/atom/ns#' term='Pentaho'/><category scheme='http://www.blogger.com/atom/ns#' term='CDA'/><category scheme='http://www.blogger.com/atom/ns#' term='CCC'/><category scheme='http://www.blogger.com/atom/ns#' term='CTools'/><category scheme='http://www.blogger.com/atom/ns#' term='CDF'/><category scheme='http://www.blogger.com/atom/ns#' term='BI'/><title type='text'>Transform a CDE Dasboard to be loaded in a CDF only Pentaho Server</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;b&gt;DISCLAIMER&lt;/b&gt;: Please be advised that is higly recommended to ALWAYS use CDE, and only apply this techniques as a last resource.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;The Problem&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;I need to develop a &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; Dashboard with CDE, but my production environment doesn't have CDE installed and can't be installed. When developing a Dashboard with CDE we can see that 3 main pieces (files) are generated and can't be publish / executed in a CDF/CDA only &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; Server:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;*.wcdf: Description file containing the Name, Description and some other information.&lt;/li&gt;&lt;li&gt;*.cdfde: Definition file containing all the elements, layout and styles of the dashboard.&lt;/li&gt;&lt;li&gt;*.cda: Definition file of the CDA sources.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;The Environment&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Development Laptop with &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; 4.0.0 GA and latest CTools installed using the &lt;a href="http://pedroalves-bi.blogspot.com/2011/06/ctools-installer-making-things-fast.html"&gt;CTools Installer&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Production Environment with &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; 4.0.0 GA and the latest relases of &lt;a href="http://ci.analytical-labs.com/jenkins/job/Webdetails-CDF"&gt;CDF&lt;/a&gt; and &lt;a href="http://ci.analytical-labs.com/jenkins/job/Webdetails-CDA"&gt;CDA&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;The Findings&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;I decided to explore the option of building the dashboard with CDE (for simplicity) and then transform it into a CDF and publish it into the Production Environment, and the first step was to look at the generated html page produced when executing the CDE Dashboard in &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt;. With background knowledge on CDF I clearly noticed that it generated a CDF structure in which you can see a layout HTML section and a component definition javascript section. Based on this I got into the conclusion that it is possible to transform a CDE to a CDF.&lt;br /&gt;&lt;br /&gt;After some tests I realized that it was not going to be as simple as I thought, and the main reason is that the charts used in CDE are CCC, but CCC is only available within CDE and not in CDF. Searching for a solution I found &lt;a href="http://pedroalves-bi.blogspot.com/2011/06/ccc-charts-in-cdf.html"&gt;Pedro Alves' post&lt;/a&gt; about integrating CDE in CDF.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;The Solution &lt;/span&gt;Phase 1&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a new Solution (Top level folder) in &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; User Console &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;MyCompany&lt;/span&gt;&lt;/span&gt;, then create a new folder in the solution &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;Dashboards&lt;/span&gt;&lt;/span&gt; and an aditional folder under that as &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;files&lt;/span&gt;&lt;/span&gt; to have a directory structure like this:&lt;/li&gt;&lt;ul style="color: #351c75;"&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;MyCompany&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;Dashboards&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;files&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;Place the company logo (in my case sw_logo.jpg) in the &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;files&lt;/span&gt;&lt;/span&gt; folder.&lt;/li&gt;&lt;li&gt;Build the CDE Dashboard using custom CSS, the logo of the company, a table and bar chart (Sales Dashboard Temp). Those files should be placed in the files directory. Save the dashboard as &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;Sales&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Execute the Dashboard in &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; User Console.&lt;/li&gt;&lt;li&gt;Get the HTML source code generated and save it as a file &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;template.html&lt;/span&gt;&lt;/span&gt; in the same directory where the dashboard is.&lt;/li&gt;&lt;li&gt;Open with a text editor the file template.html and delete everything above&amp;nbsp; the tag &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;&amp;lt;div class='container'&amp;gt;&lt;/span&gt;&lt;/span&gt; (do not delete the mentioned tag) and delete also the final &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt; and &lt;span style="color: #351c75; font-size: x-small;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt; tags.&lt;/li&gt;&lt;li&gt;Create a new file named &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;Sales.xcdf&lt;/span&gt;&lt;/span&gt; (Or how you named your Dashboard file) and add a structure similar to: &lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;cdf&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Sales Dashboard&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;icon&amp;gt;&amp;lt;/icon&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;template&amp;gt;template.html&amp;lt;/template&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;nbsp; &amp;lt;style&amp;gt;clean&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;/cdf&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Refresh the Solution Repository and execute the newly created Dashboard.&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;The Solution &lt;/span&gt;Phase 2&lt;/b&gt;&lt;br /&gt;Notice that when executing the newly created dashboard, some problems are encountered:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The Image and styles are not applied.&lt;/li&gt;&lt;li&gt;If using a CCC Chart in the Dashboard, an error will pop &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;Object type ccc***** can't be mapped to a valid class&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt;To fix these problems follow the following steps:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Open the template.html and styles.css (or how you named it) in a text editor.&lt;/li&gt;&lt;li&gt;Look for the tag that includes your stylesheet (In my case &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;&amp;lt;link rel="stylesheet" type="text/css" href="res/MyCompany/Dashboards/files/styles.css?v=1314758846169" /&amp;gt;&lt;/span&gt;&lt;/span&gt;), this tag is invalid because the resource is not valid within CDF scope, change it to something like this:&lt;br /&gt;&lt;span style="color: #351c75; font-size: x-small;"&gt;&amp;lt;link rel="stylesheet" type="text/css" href="GetCDFResource?resource=/MyCompany/Dashboards/files/styles.css" /&amp;gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;Both in the stylesheet file (styles.css) and in the html file (template.html) replace any link wih the correct value using the &lt;span style="background-color: white; color: #351c75; font-size: x-small;"&gt;GetCDFResource?&lt;/span&gt; entry type.&lt;/li&gt;&lt;ul style="color: #351c75;"&gt;&lt;li&gt;&lt;span style="font-size: x-small;"&gt;url('sw_logo.jpg') will be changed to url('GetCDFResource?resource=/MyCompany/Dashboards/files/sw_logo.jpg') &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Follow the instructions in  &lt;a href="http://pedroalves-bi.blogspot.com/2011/06/ccc-charts-in-cdf.html"&gt;Pedro Alves' post&lt;/a&gt; about integrating CDE in CDF but instead of copying the files into any "random" location, create the following folder &lt;span style="font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;pentaho-solutions/pentaho-cdf/js/CCC&lt;/span&gt;&lt;/span&gt; and place there the files.&lt;/li&gt;&lt;li&gt;Add the following lines at the top of the template.html file to include CCC into your dashboard:&lt;br /&gt;&lt;span style="font-family: inherit; font-size: x-small;"&gt;&lt;span style="color: #351c75;"&gt;&amp;lt;script&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;     type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/svg.js"&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt;     data-path="/pentaho/content/pentaho-cdf/js/CCC/"&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/jquery.tipsy.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/protovis.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/tipsy.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/pvc-d1.0.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/protovis-implementation.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br style="color: #351c75;" /&gt;&lt;span style="color: #351c75;"&gt; &amp;lt;script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/CCC/ccc-implementation.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Refresh the Solution Repository and execute the modified Dashboard.&lt;/li&gt;&lt;/ul&gt;Using this techniques, it will be possible to convert almost any CDE dashboard, and I say "almost" because I haven't tested it with complex ones, in a CDF dashboard.&lt;br /&gt;&lt;br /&gt;Please be aware that buy following this procedure, there is a change of deleting and changing some &lt;a href="http://www.pentaho.com/"&gt;Pentaho&lt;/a&gt; system files/folders and can damage the installation so please create a backup and apply and test first in a Dev Environment.&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;ol&gt;&lt;/ol&gt;&lt;ol&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3010155004478818581-4875607522747713558?l=rhaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rhaces.blogspot.com/feeds/4875607522747713558/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://rhaces.blogspot.com/2011/08/transform-cde-dasboard-to-be-loaded-in.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3010155004478818581/posts/default/4875607522747713558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3010155004478818581/posts/default/4875607522747713558'/><link rel='alternate' type='text/html' href='http://rhaces.blogspot.com/2011/08/transform-cde-dasboard-to-be-loaded-in.html' title='Transform a CDE Dasboard to be loaded in a CDF only Pentaho Server'/><author><name>Rodrigo Haces</name><uri>http://www.blogger.com/profile/06360665053839897264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3010155004478818581.post-3920192222100398694</id><published>2011-08-30T15:02:00.001-07:00</published><updated>2011-08-30T15:02:49.001-07:00</updated><title type='text'>First Blog Entry</title><content type='html'>Hi all, this is my first blog entry, I will try to write about different Pentaho BI implementations from time to time.&lt;br /&gt;&lt;br /&gt;Rodrigo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3010155004478818581-3920192222100398694?l=rhaces.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rhaces.blogspot.com/feeds/3920192222100398694/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://rhaces.blogspot.com/2011/08/first-blog-entry.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3010155004478818581/posts/default/3920192222100398694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3010155004478818581/posts/default/3920192222100398694'/><link rel='alternate' type='text/html' href='http://rhaces.blogspot.com/2011/08/first-blog-entry.html' title='First Blog Entry'/><author><name>Rodrigo Haces</name><uri>http://www.blogger.com/profile/06360665053839897264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
