📄 department.jrxml
字号:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="department"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="535"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<reportFont name="df" isDefault="false" fontName="瀹嬩綋" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
<parameter name="sub_report_path" isForPrompting="false" class="java.lang.String"/>
<parameter name="maxid" isForPrompting="true" class="java.lang.Integer">
<defaultValueExpression ><![CDATA[new Integer(0)]]></defaultValueExpression>
</parameter>
<queryString language="hql"><![CDATA[from Department as d where d.did < $P{maxid}]]></queryString>
<field name="did" class="java.lang.Integer"/>
<field name="dname" class="java.lang.String"/>
<field name="employees" class="java.util.Set"/>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="50" isSplitAllowed="true" >
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="535" height="50" forecolor="#FFFFFF" backcolor="#000099" key="staticText"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font reportFont="df" size="24" isBold="true"/>
</textElement>
<text><![CDATA[鍖楀ぇ闈掗笩閮ㄩ棬鏄庣粏鎶ヨ〃]]></text>
</staticText>
<line direction="TopDown">
<reportElement x="0" y="48" width="534" height="0" key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
<line direction="TopDown">
<reportElement x="0" y="3" width="534" height="0" key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
</band>
</title>
<pageHeader>
<band height="10" isSplitAllowed="true" >
<line direction="BottomUp">
<reportElement x="0" y="9" width="535" height="0" key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="78" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement x="127" y="2" width="398" 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 reportFont="df"/>
</textElement>
<textFieldExpression class="java.lang.Integer"><![CDATA[$F{did}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="2" width="178" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText" positionType="Float"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font reportFont="df"/>
</textElement>
<text><![CDATA[閮ㄩ棬ID]]></text>
</staticText>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement x="127" y="21" width="398" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" isPrintWhenDetailOverflows="true"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font reportFont="df"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{dname}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="21" width="178" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText" positionType="Float"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font reportFont="df"/>
</textElement>
<text><![CDATA[閮ㄩ棬鍚嶇О]]></text>
</staticText>
<subreport isUsingCache="true">
<reportElement x="52" y="41" width="231" height="25" key="subreport-1"/>
<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{employees})]]></dataSourceExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{sub_report_path}]]></subreportExpression>
</subreport>
</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 reportFont="df"/>
</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 reportFont="df"/>
</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 reportFont="df"/>
</textElement>
<textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -