Adding hyperlinks and anchors to reports

JasperReports allows us to add hyperlinks and anchors to our reports. The only report elements that can be hyperlinks or anchors are text fields, charts, and images. Hyperlinks allow us to quickly navigate between different report sections, a feature that is very useful when producing long reports. The following example illustrates how to add hyperlinks to our reports:

<?xml version="1.0" encoding="UTF-8" ?> <jasperReportxmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="HyperLinkDemoReport" leftMargin="5" rightMargin="5"> ...

Get JasperReports 3.5 for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.