Erik Cole Acclaimed Contributor.
Acclaimed Contributor.
706 views

Excel report template: hyperlinks

Jump to solution

Hi...does anyone know how to make a hyperlink field in the Excel report template? For example, I want to recreate what you get when you use the "export to Excel" funtion from within the OOTB Request List portlet and have the request_id field retain the hyperlink format.

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: Excel report template: hyperlinks

Jump to solution

Hi Erik,

You have to use the <jt:hyperlink> tag. See http://jett.sourceforge.net/tags/hyperlink.html 

This means that you also need to know the BASE_URL of the server you want to create the link to; different options here:

1) Hard code the URL in your excel template

2) Pass it as a parameter in your report type

3) Use some scripting code in order to retrieve BASE_URL at run time - but that requires invoking some internal PPM Java API that are not officially supported for external use, and might be modified in the future. Still, in case you need it, this one should work: com.kintana.core.server.ServerConfigAgent.getBaseURL().

So, to give you an example of option 3), if the request ID is in a variable id and the request description in a variable description and that you'd like to insert the description as a hyperlink to the request, you would create your hyperlink like that: (not tested, you might need a few adjustments to get it to work😞

<jt:hyperlink type="url" address="${com.kintana.core.server.ServerConfigAgent.getBaseURL().concat('/web/knta/crt/RequestDetail.jsp?REQUEST_ID=').concat(id)}" value="${description}"/>

This assumes that BASE_URL looks like https://server:port/itg 

Thanks,

Etienne.

 

 

2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Excel report template: hyperlinks

Jump to solution

Hi Erik,

You have to use the <jt:hyperlink> tag. See http://jett.sourceforge.net/tags/hyperlink.html 

This means that you also need to know the BASE_URL of the server you want to create the link to; different options here:

1) Hard code the URL in your excel template

2) Pass it as a parameter in your report type

3) Use some scripting code in order to retrieve BASE_URL at run time - but that requires invoking some internal PPM Java API that are not officially supported for external use, and might be modified in the future. Still, in case you need it, this one should work: com.kintana.core.server.ServerConfigAgent.getBaseURL().

So, to give you an example of option 3), if the request ID is in a variable id and the request description in a variable description and that you'd like to insert the description as a hyperlink to the request, you would create your hyperlink like that: (not tested, you might need a few adjustments to get it to work😞

<jt:hyperlink type="url" address="${com.kintana.core.server.ServerConfigAgent.getBaseURL().concat('/web/knta/crt/RequestDetail.jsp?REQUEST_ID=').concat(id)}" value="${description}"/>

This assumes that BASE_URL looks like https://server:port/itg 

Thanks,

Etienne.

 

 

Erik Cole Acclaimed Contributor.
Acclaimed Contributor.

Re: Excel report template: hyperlinks

Jump to solution

Perfect, thanks!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.