<reportElement
x="241"
y="3"
width="114"
height="17"
forecolor="#000000"
backcolor="#FFFFFF"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font pdfFontName="STSong-Light" size="12" pdfEncoding ="UniGB-UCS2-H"/>
</textElement>
<textFieldExpression class="
java.lang.String"><![CDATA[$F{address.country}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="27" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="325"
y="4"
width="170"
height="19"
forecolor="#000000"
backcolor="#FFFFFF"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Right">
<font size="10"/>
</textElement>
<textFieldExpression class="
java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="499"
y="4"
width="36"
height="19"
forecolor="#000000"
backcolor="#FFFFFF"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="10"/>
</textElement>
<textFieldExpression class="
java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<line direction="TopDown">
<reportElement
x="0"
y="3"
width="535"
height="0"
key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="1"
y="6"
width="209"
height="19"
forecolor="#000000"
backcolor="#FFFFFF"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="10"/>
</textElement>
<textFieldExpression class="
java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</j
asperReport>
注册ACTION,在xwork.xml中添加我们需要的action,
<!-- Reports-START -->
<action name="myJasperTest" class="JasperAction">
<result name="success" type="jasper">
<param name="location">/WEB-INF/reports/userList.jasper</param>
<param name="dataSource">myList</param>
<param name="format">PDF</param>
</result>
</action>
<!-- Reports-END -->
可以通过url:http://localhost:8080/项目名/myJasperTest.html访问到该报表。WW提供了很好,很优雅的处理JasperReport文件解决方案;指定.jasper文件的位置,指定使用的数据源dataSource,然后她就可以工作了。