Hi Guys,
This post will talk about hyperlink on the columns in table component.
Aim of the concept : Provide Hyperlink for the column values and drill down to next dashboard on clicking the column field(string like field or any other).
Software Ready: C-Tools of 14.06.18 version, foodmart database of postgresql,chrome or mozilla browser.
Core part is :
Assuming that you have preliminary knowledge on sample table creation, I'm just presenting the tip here.
Sample Image :
As shown in image as quick as possible you click on Full Name column values , you have to get the detailed dashboard of that particular person. This can be achievable using below concept.
1) Develop your second dashboard separately with all the necessary functionality on it with input controls.
2) Open the dashboard in New window. capture the URL from address bar.
3)Go to your first dashboard , in Edit mode ->Open the table component ->In the click action you have to write below code.
function testClick(e) {
var id = e.tableData[e.rowIdx][0];
window.location = '/pentaho/api/repos/:public:Dashboards%20Demos:May21stBackUp:Dashboards%20Demos:SalesDashboard4_TabularDashboard:Dashboard2TableCustomizationConditionalColoringDemo.wcdf/generatedContent';
}
4) For showing hyperlink(blue colored text with underline), go to the column type properties and give there type as hyperlink for your first column(or in your requirement preferred column).
5) Give the indexes for the columns in your query Data source area.
6) Now, it'll show as shown in figure and as soon as you perform click on "Full Name" field values it'll take you the detailed dashboard.
Passing the field value as parameter to child dashobard when performing click action.
Get the field value in a parameter (Browse drilldown from 1 dashboard to another dashboard in archives of my posts- There I've explained how to capture the field value into a parameter).. Hmmm.. Click here
Take an alert function to test to confirm the value is picked into a parameter.
Add this parameter to the URL in the above code..
i.e.,
Sample code :
function testClick(e) {
var id = e.tableData[e.rowIdx][0];
window.location = '/pentaho/content/pentaho-cdf-dd/Render?solution=XXX&path=XXX&file=XXX.wcdf&ParameterFullName=' +id;
}
This is the work done I had done in one of my requirements.. Hope this will helpful to some one in the community.
This you can implement for which ever column you want .. Just replace the index in 2nd line of code..
Reference :
http://forums.pentaho.com/showthread.php?157344-How-to-make-URL-for-records-in-CDE-table-component&p=379905#post379905
This post will talk about hyperlink on the columns in table component.
Aim of the concept : Provide Hyperlink for the column values and drill down to next dashboard on clicking the column field(string like field or any other).
Software Ready: C-Tools of 14.06.18 version, foodmart database of postgresql,chrome or mozilla browser.
Core part is :
Assuming that you have preliminary knowledge on sample table creation, I'm just presenting the tip here.
Sample Image :
As shown in image as quick as possible you click on Full Name column values , you have to get the detailed dashboard of that particular person. This can be achievable using below concept.
1) Develop your second dashboard separately with all the necessary functionality on it with input controls.
2) Open the dashboard in New window. capture the URL from address bar.
3)Go to your first dashboard , in Edit mode ->Open the table component ->In the click action you have to write below code.
function testClick(e) {
var id = e.tableData[e.rowIdx][0];
window.location = '/pentaho/api/repos/:public:Dashboards%20Demos:May21stBackUp:Dashboards%20Demos:SalesDashboard4_TabularDashboard:Dashboard2TableCustomizationConditionalColoringDemo.wcdf/generatedContent';
}
4) For showing hyperlink(blue colored text with underline), go to the column type properties and give there type as hyperlink for your first column(or in your requirement preferred column).
5) Give the indexes for the columns in your query Data source area.
6) Now, it'll show as shown in figure and as soon as you perform click on "Full Name" field values it'll take you the detailed dashboard.
Passing the field value as parameter to child dashobard when performing click action.
Get the field value in a parameter (Browse drilldown from 1 dashboard to another dashboard in archives of my posts- There I've explained how to capture the field value into a parameter).. Hmmm.. Click here
Take an alert function to test to confirm the value is picked into a parameter.
Add this parameter to the URL in the above code..
i.e.,
Sample code :
function testClick(e) {
var id = e.tableData[e.rowIdx][0];
window.location = '/pentaho/content/pentaho-cdf-dd/Render?solution=XXX&path=XXX&file=XXX.wcdf&ParameterFullName=' +id;
}
This is the work done I had done in one of my requirements.. Hope this will helpful to some one in the community.
This you can implement for which ever column you want .. Just replace the index in 2nd line of code..
Reference :
http://forums.pentaho.com/showthread.php?157344-How-to-make-URL-for-records-in-CDE-table-component&p=379905#post379905
No comments:
Post a Comment