Showing posts with label tool. Show all posts
Showing posts with label tool. Show all posts
Thursday, February 12, 2015
Table Component Tooltip in Pentaho CDE Showing hidden column values as tool tip on 1st column or any column of table component
Hi Guys,
A requirement make you go in-depth of subject. Few days back I have got a requirement to show tool tip on table component column(s).
Id like to thank you to pentaho forum for their support in working with java script/jQuery in achieving this functionality.
Requirement :
Take a single query of 4 columns, hide 4th column and its values on table component and show this hidden column values as tool tip on the first column of table component.
In other words, Using CDA get 4 columns output but get only 1st 3 columns on table component and show the 4th column(hidden column) values as tool tip on the 1st column of table component.
Example Environment :
Pentaho C-Tools of TRUNK version(after 14 version trunk)
Pentaho BA server 5.1.0 stable
PostgreSQL foodmart database for querying purpose.
Here Id like to concentrate on the core part of the example hence design your layout.
What you can learn in this post ?
1. Query component usage.
2. How to store result set in a parameter using query component.
3. How to hide columns using java script/jQuery script on table component.
4. How to make use of tipsy function to show tooltip on table component.
Layout section :
Design as per your requirement
Data source section :
Query 1 :
SELECT employee_id,full_name,gender,position_title from employee limit 10
Sample image
Query output:

Components panel section
Here for this post you need to work out with a parameter, a query component and table component.
first lets have a parameter : Name it as tooltipValues

Query component :
You will be storing the query output in parameter using query component.

Write below Code in PostFetch Expressionof Query Component :
function f2(data){
var tooltipValues = [];
for(var i=0; i <data.resultset.length; i++){
tooltipValues.push(data.resultset[i][3]);
}
alert(tooltipValues);
alert("length="+data.resultset.length);
return tooltipValues;
}
Now the table Component
Add the table component, give a name to it, and the data source for it,(in this example give the same data source i.e., Datasource=query1_table) & the HTML Object here it is Panel_1
Write below code in Post Execution of table component
function myTip()
{
$(th:nth-child(4),td:nth-child(4)).hide();
$(#Panel_1 tr td:first-child).each(
function(index){
$(this).tipsy({title: function(){ return tooltipValues[index][3] ; }});
}
);
}
In the above code
Using hide() function you are hiding the result of 4th column
#Panel_1 is the HTML Object
Using tipsy() function you are showing the 4th column values as tooltip on the 1st column.
td:first-child, you are telling the jQuery to show the tooltip values on 1st column of the table component.
Thats it you are done...!!!
Save the dashboard and see the preview.
Preview/Observations :
Image 1 :

Image 2:

Image-3:
Source Code of this example :
Download here
Thank you for reading this article.
A requirement make you go in-depth of subject. Few days back I have got a requirement to show tool tip on table component column(s).
Id like to thank you to pentaho forum for their support in working with java script/jQuery in achieving this functionality.
Requirement :
Take a single query of 4 columns, hide 4th column and its values on table component and show this hidden column values as tool tip on the first column of table component.
In other words, Using CDA get 4 columns output but get only 1st 3 columns on table component and show the 4th column(hidden column) values as tool tip on the 1st column of table component.
Example Environment :
Pentaho C-Tools of TRUNK version(after 14 version trunk)
Pentaho BA server 5.1.0 stable
PostgreSQL foodmart database for querying purpose.
Here Id like to concentrate on the core part of the example hence design your layout.
What you can learn in this post ?
1. Query component usage.
2. How to store result set in a parameter using query component.
3. How to hide columns using java script/jQuery script on table component.
4. How to make use of tipsy function to show tooltip on table component.
Layout section :
Design as per your requirement
Data source section :
Query 1 :
SELECT employee_id,full_name,gender,position_title from employee limit 10
Sample image


Components panel section
Here for this post you need to work out with a parameter, a query component and table component.
first lets have a parameter : Name it as tooltipValues

Query component :
You will be storing the query output in parameter using query component.

Write below Code in PostFetch Expressionof Query Component :
function f2(data){
var tooltipValues = [];
for(var i=0; i <data.resultset.length; i++){
tooltipValues.push(data.resultset[i][3]);
}
alert(tooltipValues);
alert("length="+data.resultset.length);
return tooltipValues;
}
Now the table Component
Add the table component, give a name to it, and the data source for it,(in this example give the same data source i.e., Datasource=query1_table) & the HTML Object here it is Panel_1
Write below code in Post Execution of table component
function myTip()
{
$(th:nth-child(4),td:nth-child(4)).hide();
$(#Panel_1 tr td:first-child).each(
function(index){
$(this).tipsy({title: function(){ return tooltipValues[index][3] ; }});
}
);
}
In the above code
Using hide() function you are hiding the result of 4th column
#Panel_1 is the HTML Object
Using tipsy() function you are showing the 4th column values as tooltip on the 1st column.
td:first-child, you are telling the jQuery to show the tooltip values on 1st column of the table component.
Thats it you are done...!!!
Save the dashboard and see the preview.
Preview/Observations :
Image 1 :

Image 2:

Image-3:

Source Code of this example :
Download here
Thank you for reading this article.
Thursday, January 29, 2015
Rockchip SD Card Firmware Burning Tool
Rockchip SD Card Firmware Tool.
MicroSD Burning Tool .
This tool will help Installing firmware on Rockchip Tablets with MicroSd card. You can write firmware image on MicroSD card and restore or update your Rockchip tablets. Upgrade or restore any Rockchip tablet without computer or Flashing Tools.
Before proceeding make sure you have right firmware. Wrong firmware will not boot up or may harmful for your tablet pc.So make sure to check the firmware structure (Size and parameters after burning on sd card) What board id ,BoxChip,CPU Chip ,does my tablet pc have ?
Things to remember before Flashing Tablet Pc
Download Rockchip upgrade disk tool
Double Click SD_Firmware_Tool.exe
Select Removable Disk (Memory card Drive) and click on upgrade firmware. (as shown below).



Burning Process will begun .Firmware will be start written on Sd Card.

When the process complete the following message will be shown
Files should be in memory card like " rksdfw.tag , sd_boot_config , sdupdate ".
Insert memory card in tablet. Start power button , written Firmware will update your tablet pc.
Download Rockchip upgrade disk tool
How to Update / Restore Rockchip Tablet with MicroSD Card.
Double Click SD_Firmware_Tool.exe
Select Removable Disk (Memory card Drive) and click on upgrade firmware. (as shown below).

Click Firmware a pop up window will open .Select Img file for Rockchip Tablet Pc which you have download from officials web page. (as shown in image)

Click on Create , a window will pop up "Creating upgrade disk, Data will ose in the disk,yes or no? Select "Yes" to format memory card .

Burning Process will begun .Firmware will be start written on Sd Card.

When the process complete the following message will be shown
"1 Creating upgrade disk ok"
Insert memory card in tablet. Start power button , written Firmware will update your tablet pc.
Subscribe to:
Posts (Atom)