Hyperlink reference doesn't work in iPad

0

Hi everyone,
I've created a report with a external hyperlink, similar to samples/hyperlink/reports/HyperlinkReport.jrxml. When I export the report to pdf the link works fine in Pc but doesn't work in iPad. I've edited the pdf with Adobe Professional and I've observed that link is generated with a javascript code not as external link. This is the javascript injected by JasperReports in the hyperlink:

if (app.viewerVersion < 7){
    this.getURL("http://www.google.com");
} else {
    app.launchURL("http://www.google.com", true);
};

The jrxml code is:

<textField hyperlinkType="Reference" hyperlinkTarget="Blank">
         <reportElement x="5" y="95" width="200" height="15" uuid="773ef7f6-735d-47f7-8b16-d8136c5da1d3"/>
         <textFieldExpression><![CDATA["  >> Click here to go to www.google.com"]]></textFieldExpression>
         <hyperlinkReferenceExpression><![CDATA["http://www.google.com"]]></hyperlinkReferenceExpression>
 </textField>
Please someone who can help me.
Thanks.
Juan

juan.alonso's picture
Joined: Feb 1 2016 - 4:08am
Last seen: 3 months 5 days ago

1 Answer:

1

The solution was simple:

I've removed the hyperlinkTarget atribute and fixed!!

<textField hyperlinkType="Reference">
<reportElement x="5" y="95" width="200" height="15" uuid="773ef7f6-735d-47f7-8b16-d8136c5da1d3"/>
<textFieldExpression><![CDATA[" >> Click here to go to www.google.com"]]></textFieldExpression>
<hyperlinkReferenceExpression><![CDATA["http://www.google.com"]]></hyperlinkReferenceExpression>
</textField>

juan.alonso's picture
Joined: Feb 1 2016 - 4:08am
Last seen: 3 months 5 days ago
Feedback
randomness