Monday, December 31, 2012

Create a url link with JasperReports

To make a textField a hyperlink to an external URL, you need to add the attributehyperlinkType="Reference" to the element, and add a  tag within it. The reference expression is where you put the URL.
For example:

    
    
    <![CDATA["Click Here!"]]>
    <![CDATA["http://www.google.com"]]>

The hyperlinkTarget attribute behaves in the same way as the target attribute in HTML.
Note that only textFields, images and charts can be hyperlinked in this way.
For a more in-depth explanation and more examples, see this jasperforge page.

No comments:

Post a Comment