Focal Point
[CLOSED] Question on Creating a Hyperlink with report output

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/771104541

June 09, 2009, 05:33 PM
<Sherry Carbaugh>
[CLOSED] Question on Creating a Hyperlink with report output
We have created a report that the output includes the format for a URL...we are wanting to change the output to be able to be used a link...right now it looks like this...
https://secure.bncollege.com/w...ing=Y&courseXml=?xml version="1.0" encoding="UTF-8"?>

But the end user who would get the report text does not get a link to click on. Does any know how can we create a link for the report output?

This message has been edited. Last edited by: Kerry,
June 09, 2009, 06:13 PM
Darin Lee
I'm not quite sure how you are intending to include the link. Maybe a sample of your code would help.

The easiest way is through a stylesheet where you attach a link to a component (Heading, Column, Column Title, etc.) In this example it is on the heading text:

TABLE FILE CAR
PRINT 
     CAR
BY COUNTRY
HEADING
"Click Here to go to google"
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     URL=http://www.google.com,
$
ENDSTYLE
END


You could also create a define field that contains the entire URL via href reference which, when displayed in an HTML report, would also provide a link.

When you post your code, please include it in
[code]
[/code] tags. If you post HTML, click on the "Disable HTML" in the Options (or use the code tages.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
June 12, 2009, 03:51 PM
<Sherry Carbaugh>
This issue has not been resolved. The suggestions I received were very helpful but did not resolve/solve my issue. Due to the characters contained in the hyperlink, it could not be referenced in the heading are as was suggested.
June 13, 2009, 04:43 PM
Doug
Sherry,

Would you please provide the solution which you used so that we may all bebefit from it?

Thanks, Doug




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
June 15, 2009, 11:10 AM
Darin Lee
I was attempting to help Sherry with a solution, but the complexity of the hyperlink appears to be something that WF cannot handle witht he standard drill-down functionality. What she is trying to do is create a hyperlink which includes several "sets" of data in XML format pass it to a non-WF site. Apart from using several records to create a single URL, her string contained html tags which WF chokes on. I suggested the use of Javascript to produce the link and then using the JS as a drill target instead of a URL, but I'm no JS guru, so that's as far as we got. Any other ideas?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
June 15, 2009, 11:43 AM
Francis Mariani
Darin, I think your idea of calling a JS function is the right idea. Is there updated code we can look at - I'm not sure what you mean by the hyperlink containing XML data.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 15, 2009, 01:20 PM
Darin Lee
Sherry - sorry if I took over your thread - your requirement just piqued my interest. Here's an example of the complete URL she needs:

https://secure.bncollege.com/w...ing=Y&courseXml=?xml version="1.0" encoding="UTF-8"?><textbookorder><courses><course dept="SES" num="111" sect="200" term="A09"/><course dept="BAFN" num="305" sect="401" term="A09"/><course dept="MUS" num="140" sect="970" term="A09"/></courses></textbookorder>

It appears that she is passing a set of data for three different courses, attempting to get a listing from the target URL of all the required textbooks.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
June 16, 2009, 07:11 AM
Lucas
Perhaps encodeURI() in Javascript could help you out. It encodes everything in the querystring but leaves the main part of the URI intact.

Here is an example of how it works.
<html>
<head>
<script>
function example()
{
var stuffToEncode = new String(document.form1.uri.value);
if (window.confirm('Would you like to navigate to this page\n ' +stuffToEncode))
{
window.location = encodeURI(stuffToEncode);
} else alert(encodeURI(stuffToEncode));
}
</script>
</head>
<body>
<form name="form1">
<input type="text" name="uri" value="paste uri here!" size="60" /><br />
<input type="button" value="encode stuff" onClick="example()" />
</form>
</body>
</html>



7.6.6 Mainframe
7.6.4 Web Focus
Windows