Hi,
I know this question as been answered before, but I can't get this to work. I'm trying to have a column in each row of my table that has a link with the label 'Print Report'. When someone clicks the link they should go to the URL of the report.
I have query that returns the URL from the database in this format: [Print Report][http://biserver:8080/pentaho/api/repos/.../report.prpt]. Then I'm using this code provided in the Leaning Pentaho CTools book in the Pre Execution field, but it doesn't work:
function f(){
var options = {
openInNewTab: true,
prependHttpIfNeeded: true,
regexp: null,
pattern: "/\[(.*?)\]/g",
urlReference: 2,
labelReference: 1
};
this.setAddInOptions("colType", "hyperlink", options);
}
What happens is this:
As you can see instead of the label what I get is exactly what is returned by the query.
Can anyone help me solve this problem?
Thanks in advance.
Best regards,
Pedro