How do I add a static link to a jasper report

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@live.com's picture
Joined: Feb 4 2016 - 5:24am
Last seen: 2 years 4 months ago

2 Answers:

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
13944
Joined: Mar 5 2012 - 9:19am
Last seen: 2 years 7 months ago

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
170617
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago
Feedback
randomness