Java Reference
In-Depth Information
Hyperlink Type Description
Elements Defining Hyperlink Target
Hyperlink points to an external
RemoteAnchor Hyperlink points to an anchor in
an external resource.
Hyperlink points to a page in an
external resource.
The <textField> , <chart> , or <image> containing the hyperlinkType attribute
must contain the corresponding element defining the hyperlink target as shown
in the table. The only one out of these elements we haven't discussed is the
<hyperlinkPageExpression> element. This element must contain a report
expression resolving into a numeric value corresponding to the page number where
the hyperlink will take us.
PDF documents can have a tree-like 'table of contents' that allows easy navigation
between the document sections. This 'table of contents' is labeled Bookmarks in most
PDF viewers. JasperReports can generate bookmarks in reports exported to PDF
by setting the bookmarkLevel attribute of any <image> , <chart> , or <textField>
containing an <anchorExpression> sub-element. The following JRXML template
illustrates the use of the bookmarkLevel attribute to create bookmarks. It is a slightly
modified version of the second subdataset example from the previous section.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//
EN" "">
<jasperReport name="BookmarkDemoReport" leftMargin="5"
<subDataset name="Aircraft_Registrations">
<parameter name="StateParam" class="java.lang.String" />
<![CDATA[select, count(*) as aircraft_count
from aircraft a
where a.state=$P{StateParam}
and like 'A%'
group by city]]>
Search WWH ::

Custom Search