📄 xmlcustomers.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="XMLCustomers"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="515"
columnSpacing="0"
leftMargin="40"
rightMargin="40"
topMargin="50"
bottomMargin="50"
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.*" />
<style
name="Arial_Normal"
isDefault="true"
fontName="Arial"
fontSize="12"
isBold="false"
isItalic="false"
isUnderline="false"
isStrikeThrough="false"
pdfFontName="Helvetica"
pdfEncoding="Cp1252"
isPdfEmbedded="false"
/>
<style
name="Arial_Bold"
isDefault="false"
fontName="Arial"
fontSize="12"
isBold="true"
isItalic="false"
isUnderline="false"
isStrikeThrough="false"
pdfFontName="Helvetica-Bold"
pdfEncoding="Cp1252"
isPdfEmbedded="false"
/>
<style
name="Arial_Italic"
isDefault="false"
fontName="Arial"
fontSize="12"
isBold="false"
isItalic="true"
isUnderline="false"
isStrikeThrough="false"
pdfFontName="Helvetica-Oblique"
pdfEncoding="Cp1252"
isPdfEmbedded="false"
/>
<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">
<defaultValueExpression ><![CDATA[" "]]></defaultValueExpression>
</parameter>
<queryString language="xPath"><![CDATA[/Northwind/Customers]]></queryString>
<field name="CustomerID" class="java.lang.String">
<fieldDescription><![CDATA[CustomerID]]></fieldDescription>
</field>
<field name="CompanyName" class="java.lang.String">
<fieldDescription><![CDATA[CompanyName]]></fieldDescription>
</field>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="46" isSplitAllowed="true" >
<line direction="TopDown">
<reportElement x="0" y="0" width="515" height="1" key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
<staticText>
<reportElement style="Arial_Normal" x="0" y="10" width="515" height="30" forecolor="#FF3300" key="staticText"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Center">
<font fontName="妤蜂綋_GB2312" pdfFontName="Helvetica-Bold" size="22" isBold="true"/>
</textElement>
<text><![CDATA[XMLDataSource Report鍙婂瓙鎶ヨ〃绀轰緥]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="29" isSplitAllowed="true" >
<rectangle>
<reportElement x="0" y="5" width="515" height="15" backcolor="#333333" key="rectangle"/>
<graphicElement stretchType="NoStretch" pen="None"/>
</rectangle>
<staticText>
<reportElement style="Arial_Bold" mode="Opaque" x="0" y="5" width="515" height="21" forecolor="#FFFFFF" backcolor="#333333" key="staticText"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font fontName="妤蜂綋_GB2312" size="14"/>
</textElement>
<text><![CDATA[瀹㈡埛璁㈠崟鍒楄〃]]></text>
</staticText>
<line direction="TopDown">
<reportElement x="0" y="26" width="515" height="1" key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="50" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement style="Arial_Bold" x="5" y="5" width="100" height="15" key="textField" isPrintWhenDetailOverflows="true"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font fontName="妤蜂綋_GB2312"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CustomerID}]]></textFieldExpression>
</textField>
<staticText>
<reportElement style="Arial_Bold" x="404" y="5" width="100" height="15" key="staticText" isPrintRepeatedValues="false" isPrintWhenDetailOverflows="true"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font fontName="妤蜂綋_GB2312"/>
</textElement>
<text><![CDATA[(continued)]]></text>
</staticText>
<line direction="TopDown">
<reportElement x="0" y="20" width="515" height="1" key="line" isPrintWhenDetailOverflows="true"/>
<graphicElement stretchType="NoStretch"/>
</line>
<subreport isUsingCache="true">
<reportElement x="5" y="25" width="507" height="20" backcolor="#FFCC99" key="subreport" isPrintRepeatedValues="false" isRemoveLineWhenBlank="true"/>
<subreportParameter name="XML_DATA_DOCUMENT">
<subreportParameterExpression><![CDATA[$P{XML_DATA_DOCUMENT}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="XML_DATE_PATTERN">
<subreportParameterExpression><![CDATA[$P{XML_DATE_PATTERN}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="XML_NUMBER_PATTERN">
<subreportParameterExpression><![CDATA[$P{XML_NUMBER_PATTERN}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="XML_LOCALE">
<subreportParameterExpression><![CDATA[$P{XML_LOCALE}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="XML_TIME_ZONE">
<subreportParameterExpression><![CDATA[$P{XML_TIME_ZONE}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="CustomerID">
<subreportParameterExpression><![CDATA[$F{CustomerID}]]></subreportParameterExpression>
</subreportParameter>
<subreportExpression class="java.lang.String"><![CDATA["XMLOrders.jasper"]]></subreportExpression>
</subreport>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement style="Arial_Bold" x="109" y="5" width="291" height="15" key="textField" isPrintWhenDetailOverflows="true"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font fontName="妤蜂綋_GB2312"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CompanyName}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="40" isSplitAllowed="true" >
<line direction="TopDown">
<reportElement x="0" y="10" width="515" height="1" key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement x="200" y="20" width="80" height="15" key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Right">
<font/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Page " + String.valueOf($V{PAGE_NUMBER}) + " of"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement x="280" y="20" width="75" height="15" key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[" " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -