Hi,
I have table component with a number of rows. If I click on a row I can show the unique ID of the row data. How can I link with that ID and other parameters to another dashboard after I click a row.
Thanks in advance!
Kind Regards,
Pieter
Hi,
I have table component with a number of rows. If I click on a row I can show the unique ID of the row data. How can I link with that ID and other parameters to another dashboard after I click a row.
Thanks in advance!
Kind Regards,
Pieter
Hi, you can link to a dashboard using a url like this: http://localhost:8080/pentaho/conten...=yourfile.wcdf I usually pass parameters to another dashboard in this way: http://localhost:8080/pentaho/conten...1=xxx&par2=yyy In the linked dashboard I use custom parameter components instead of simple parameter components, because I need to set the default value of a parameter calling a javascript function that return the right value from the url.
Table Click Action
First column is the key
function(a){
window.location = './Render?solution=solutionFolder&path=dashboardFolder&file=newDashboard.wcdf¶m1=' + a.series;
}
Any column as key
function(a){
var colNum = 3;
window.location = './Render?solution=solutionFolder&path=dashboardFolder&file=newDashboard.wcdf¶m1=' + a.tableData[a.rowIdx][colNum -1];
}
Receiving Report
Custom parameter or in the pre-execution for the parameter:
function(){
if(Dashboards.getQueryParameter("param1") != ""){
param1 = Dashboards.getQueryParameter("param1");
}
}
Many thanks @hi5 and @lukolap !!
Correction: Fairly obvious but do NOT add the receiving report javascript to the pre-execution of a parameter select. The initial linking will work but you will be unable to change the parameter without having it reset by the URL.
Use the Custom Parameter JS
function(){
if(Dashboards.getQueryParameter("param1") != ""){
return Dashboards.getQueryParameter("param1");
}
else{
return "Default Value";
}
}
Last edited by hi5; 06-07-2012 at 11:31 AM.