Thursday, 26 June 2014

Define JNDI For Pentaho BA Server 5.0



Hello Guys,
In this post i would like to explain How to Define JNDI For Pentaho BA Server 5.0

Add Driver :

Place appropriate driver for Sql Server 8 and 12  which is jtds-1.3.0.jar to this directory for the BA Server: /pentaho/server/biserver-ee/tomcat/lib/.

1)  Stop server  & BA server.

2) Edit the /tomcat/webapps/pentaho/WEB-INF/web.xml file.
<!-- insert additional listeners -->
<resource-ref>
    <description>Database_name</description>
    <res-ref-name>jdbc/Connection_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

3) Open & Modify this file biserver-ce/pentaho-solutions/system/simple-jndi/jdbc.properties.
Add this line at bottom and change sqltest to database name.

Connection_name/type=javax.sql.DataSource
Connection_name/driver=net.sourceforge.jtds.jdbc.Driver
Connection_name/url=jdbc:jtds:sqlserver://sqltest:1433/Database_name
Connection_name/user=root
Connection_name/password=password


4)Open & modify this file /tomcat/webapps/pentaho/META-INF/context.xml.
<!-- The contents of this file will be loaded for each web application -->

<Resource name="jdbc/Connection_name"
    auth="Container" type="javax.sql.DataSource"
    factory="org.apache.commons.dbcp.BasicDataSourceFactory"
    maxActive="20"
    maxIdle="5"
    maxWait="10000"
    username="root"
    password="password"
    driverClassName="net.sourceforge.jtds.jdbc.Driver"
    url="jdbc:jtds:sqlserver://sqltest:1433/Database_name"
/>


5) Delete the pentaho.xml filed located in the /tomcat/conf/catalina/directory.


6) Start tomcat and BA Server
 

Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal
BI Developer
"The beautiful thing about learning is nobody can take it away from you."


 


Thursday, 5 June 2014

Customization of Date Input Component in pentaho CDE

Hello Guys,

In this post i would like to explain How to Customziation look and feel of the select date input component.

Here i am just overriding the by default css to my own css file.

Step 1:Create the external css file instead of chnaging by deafult file.

Step 2: css code
#render_date /* date here date input component name you can replace by your own name*/
{
border:1px solid #808000!important;
color:#BDB76B!important;
}
.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year {
   color:#BDB76B !important;
   border:1px solid #EEE8AA!important;
}
.ui-widget-header {
  
   border: 6px solid #EEE8AA!important;
    background: none repeat scroll 0 0 #808000 !important;
}
.ui-datepicker th{
   background-color: #BDB76B!important;
}
#ui-datepicker-div{
   border:1px solid #EEE8AA!important;
}
.ui-datepicker-calendar{
   background-color:#EEE8AA!important;
}

.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active{
   border: 1px solid #BDB76B!important;
   color: #FFFFFF!important;
   font-weight: bold;
    background: none repeat scroll 0 0 #808000 !important;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
  
   background: none repeat scroll 0 0 #F0E68C;
   color:#362B36;
   border: 1px solid  #BDB76B;
}

 

Step 3: Add that file in your CDE Dashboard.


Result:   By Default    


    
 After Customization :



You can change the color code as per your requirement.

Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal
BI Developer



Wednesday, 4 June 2014

Grand Total in Table Component

Hello Guys,

In this post i would like to explain grand total in the table component.


Solution :

function() {
    var grandTotalRow = "<tfoot><tr><td>Total</td>";
  
  for(i=1;i<3;i++) {
        var total=0;
         var rows = $('#' + this.htmlObject + ' tbody tr');
          rows.each(function() {
            var cellVal = parseFloat($('td:eq('+i+')', this).text().replace(',',''));
              total += cellVal;        
        
        });
        grandTotalRow += "<td>"+ total.toFixed(2);+"</td>"; 
        }
          grandTotalRow += "</tr></tfoot>";
          if($('#'+this.htmlObject+' tfoot').length==0)
        $('#'+this.htmlObject).find('table').append(grandTotalRow);
 
    }

Note:
1) 3: Represents for numCols change as per your requirements.
2) total.toFixed(2):Fixed for up to  2 decimal      

 Reference :

http://forums.pentaho.com/showthread.php?94187-Table-Component-Grand-total

Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal
BI Developer

Monday, 7 April 2014

BootStrap In Pentaho CDE


Hello Guys

First of All I really thanx for Harris Ward (@hazamonzo) of Ivy Information Systems to provide a great webinar and It’s really help full to use of Bootstrap in Pentaho CDE for making responsive dashboard.

Also i would like thanx to Pedro Alves and Diethard Steiner.  to provide such information.

In this blog you will Learn how to create a simple but stunning and mobile compatible dashboard using the CDE and Bootstrap framework. 

Why Bootstrap:

The most popular front-end framework for developing responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases.

CDE Version:

You must install the latest trunk version  in pentaho CE  5.
In the marketplace, click to open "Community Dashboard Editor" (click over the app name, don't click the install /uninstall button) and go to version button (down-left) and choose Trunk-snapshot.

Step:
1) Click on the setting icon in the main menu and change the dashboard type to Bootstrap.


2)    Layout Structure:


With Bootstrap, the total span size of the page is 12 columns (as opposed to Blueprint, which has 24 columns).


Span Size=12/No. of columns

3) Adding Table Component


4) SQL Query:


 
 After that Save the Dashboard and check the preview

OutPut:




Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal

 

Friday, 4 April 2014

ERROR_0002 - Unable to get the list of connections in pentaho CE 5.0.1 when changing the configuration files from HSLQDB to MySQL

Hello Guys,

In this post I would like to explain Unable to get the list of connections in Pentaho CE 5.0.1 when changing the configuration files from HSLQDB to MySQL.

Problem:

I've similar problem with Pentaho 5.0.1 istalled on Linux Ubuntu and MySql5.
I followed instruction on this link http://anonymousbi.wordpress.com/201...llation-guide/ to connect data to mysql.

I can create by user console new data source but i can't publish new report, metadata, cube (using new version application prd, pmd, psw) on server.
Additionally, if i open on user console --> Browse File --> Folder --> Public --> Steel Wheels --> Reports it remain in loading and don't load anything.

Pentaho Log:

2014-04-03 17:50:20,753 ERROR [org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl] ConnectionServiceImpl.ERROR_0002 - Unable to get the list of connections: DatasourceMgmtService.ERROR_0004 - Error occurred during retrieving the datasource . Cause: exception while getting children for folder with id "b52d2785-5091-4376-beaa-ab01caf91af5"

Solution:

It seems to be working now. Somehow, when changing the configuration files from HSLQDB to MySQL, something went broken with the samples, so the steps i did to resolve the issue were:

  • Stop pentaho server
  • Remove or rename folder /pentaho-solutions/system/jackrabbit/repository
  • Start pentaho server


It all seems to be working fine now.


Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal

Wednesday, 2 April 2014

Removing MySQL 5.5 Completely

Hello Guys,

In this post I would like to explain How to uninstall Mysql from ubuntu 12.04 completely.

Command:

  • sudo apt-get remove --purge mysql-server mysql-client mysql-common
  • sudo apt-get autoremove
  • sudo apt-get autoclean
  • sudo deluser mysql
  • sudo rm -rf /var/lib/mysql


Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal

How to hide .CDA file in Pentaho CDE.

Hello Guys,

In this post I would like to explain How to hide .CDA file in Pentaho CDE.
It’s no use to the end user to see the data source in the tree view so edit:

Go to:  ../biserver-ce/pentaho-solutions/system/cda/plugin.xml
And comment the lines between:
<!–
<content-types>

</content-types>
//–>

For your reference the content type tag look like this:
<content-type type="cda" mime-type="text/html">
            <title>Data Access</title>
             <description>Community Data Access File</description>
            <icon-url>content/cda/resources/cdaFileType.png</icon-url>
            <meta-provider>pt.webdetails.cda.CdaFileMetaProvider</meta-provider>
              <operations>
                <operation>
                      <id>EDIT</id>
                    <perspective>cda.edit</perspective>
                </operation>
                <operation>
                      <id>RUN</id>
                </operation>
                <operation>
                      <id>NEWWINDOW</id>
                </operation>
              </operations>
        </content-type>


Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal