How do I add a static link to a jasper report

0
How do I embed a static URL link to the heading of my jasper reports so that when I click the company logo (or text) at the top of every HTML report, it will open our website in a browser and take me to my company home page.
 
I am using Jasper Report Studio 6.2.1 and hosting the reports on Jasper Server 6.2.1
david.tessier's picture
Joined: Feb 4 2016 - 5:24am
Last seen: 4 days 17 hours ago

2 Answers:

0

You can set the hyperlink property on your text field.  Here is a hyperlink from the HyperlinkReport.jrxml example:

<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>
elizam's picture
4497
Joined: Mar 5 2012 - 9:19am
Last seen: 8 hours 42 min ago
0

Static Text element doesn't support hyperlink so you'll have to use Text Field and just enter your company name as a value.

In the Properties, there should be "Hyperlink" tab. If you don't see it, try increasing the width of the Properties - it should be next to Advanced.

Hyperlink is also supported on image too. There should be a "Hyperlink" tab.

hozawa's picture
54460
Joined: Apr 24 2010 - 4:31pm
Last seen: 6 months 2 days ago
Feedback