order_two_company.jrxml 文件
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="
http://jasperreports.sourceforge.net/jasperreports"" target="_new" rel="nofollow">
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="order_two_company" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select * from barea]]>
</queryString>
<field name="AREAID" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="AREANAME" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="AREACODE" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="26" splitType="Stretch">
<staticText>
<reportElement x="164" y="0" width="100" height="26"/>
<box>
<pen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center">
<font fontName="PMingLiU" pdfFontName="PMINGLIU.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[地区f]]></text>
</staticText>
<staticText>
<reportElement x="264" y="0" width="100" height="26"/>
<box>
<pen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center">
<font fontName="PMingLiU" pdfFontName="PMINGLIU.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[公司]]></text>
</staticText>
<staticText>
<reportElement x="364" y="0" width="100" height="26"/>
<textElement/>
<text><![CDATA[电话]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="25" splitType="Stretch">
<textField>
<reportElement stretchType="RelativeToBandHeight" x="164" y="0" width="100" height="25"/>
<box>
<pen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="PMingLiU" pdfFontName="PMINGLIU.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AREANAME}]]></textFieldExpression>
</textField>
<subreport>
<reportElement x="264" y="0" width="200" height="25"/>
<subreportParameter name="p_areaid">
<subreportParameterExpression><![CDATA[$F{AREAID}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA["D:\\ireportxml\\order_sub_area.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band splitType="Stretch"/>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>