I want to make one word of a sentence as a hyperlink. I have written it as : Click on our website to know the details. The ma
The htm markup seems to be extremely limited. I have only found that it works for very basic html formating such as <i>
and <b>
tags. I do not think anchors or lists or any 'fancier' markup with do anything.
Hyperlinks are not supported by static text fields - they only work with text field.. it worked when i used a text field and as the expression entered static text in quotes "click here etc" Then add a hyperlink by selecting hyperlink from the context menu..
The HTML markups are only intended for the purpose of styling a text field. You are looking for the "Hyperlink" option. It doesn't work for static text fields though, but when you right click on a text field you should find the item "Hyperlink" in the context menu. This allows you to link the field to an anchor, another report or a webpage.
I know the question is pretty old, but if somebody need a code, I will add it here:
<textField>
<reportElement positionType="Float" x="220" y="45" width="406" height="60"/>
<textElement markup="html">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression><![CDATA["Click on our"+"<u><font color='blue'><a href='http://www.google.co.in'>website</a></font></u>"]]>
</textFieldExpression>
</textField>