【发布时间】:2015-06-17 19:04:59
【问题描述】:
我有一个 jrxml 文件。在这个文件中,我有一列带有指向同一报告的超链接。但是当我从任何页面点击这个链接时,jasper 服务器会加载第一页。如何加载我单击链接的同一页面? 这是jrxml的例子
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="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="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="a5de7f4f-53e0-43ce-a41d-cd01ab98e889">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[SELECT * from employee]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement x="21" y="41" width="110" height="20" uuid="ac484988-9581-4b7e-bf5d-2585ae2a1365"/>
<textElement textAlignment="Center">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[($F(roll_no))]]></textFieldExpression>
</textField>
<image hAlign="Center" hyperlinkType="ReportExecution">
<reportElement mode="Transparent" x="481" y="41" width="20" height="20" uuid="5a15a90d-499d-47ed-a768-4f703c6c5ed4"/>
<imageExpression><![CDATA["/datasources/Images/check"]]></imageExpression>
<hyperlinkParameter name="_report">
<hyperlinkParameterExpression><![CDATA["/root/reports/myReport"]]></hyperlinkParameterExpression>
</hyperlinkParameter>
</image>
<staticText>
<reportElement x="463" y="23" width="65" height="18" uuid="f13d3810-4106-42d8-acdc-0eeb8033cd32"/>
<textElement textAlignment="Center">
<font size="12" isBold="true" isUnderline="false"/>
</textElement>
<text><![CDATA[Accept]]></text>
</staticText>
<staticText>
<reportElement x="21" y="23" width="110" height="18" uuid="fbb887ce-fab7-4142-8de2-f7f565e1bb18"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Staus]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="125" splitType="Stretch"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
【问题讨论】:
-
添加一些代码或举例说明
-
添加了有问题的示例 jrxml 数据
标签: java hyperlink jasper-reports jasperserver