jasperreport xml sample

<?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="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0000000000000007"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="START_DATE" class="java.lang.String" isForPrompting="false"/>
<parameter name="END_DATE" class="java.lang.String" isForPrompting="false"/>
<queryString>
<![CDATA[SELECT distinct
       rec.TX_ID ,
       concat(pr.fst_nm, ' ', pr.sur_nm) payer_name ,
       concat(pe.fst_nm, '', pe.sur_nm) payee_name ,
       prb.cnm payer_bank,
       peb.cnm payee_bank,
       rec.amount ,
       rec.cur_cd ,
       rec.status status,
       DATE_FORMAT(rec.tx_dttm , '%Y-%m-%d') tx_dttm
FROM t_rmt_rec rec , t_payer pr , t_payee pe , t_bank_code prb , t_bank_code peb
WHERE rec.payer_id = pr.payer_id
AND rec.payee_id = pe.payee_id
AND pr.bank_cd = prb.bic
AND pe.bank_cd = peb.bic
order by rec.cur_cd]]>
</queryString>
<field name="TX_ID" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="payer_name" class="java.lang.String"/>
<field name="payee_name" class="java.lang.String"/>
<field name="payer_bank" class="java.lang.String"/>
<field name="payee_bank" class="java.lang.String"/>
<field name="amount" class="java.lang.Double">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="cur_cd" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="status" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="tx_dttm" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<variable name="v_countMoney" class="java.lang.Double" resetType="Group" resetGroup="Money" calculation="Sum">
<variableExpression><![CDATA[$F{amount}]]></variableExpression>
</variable>
<group name="Money" isStartNewPage="true">
<groupExpression><![CDATA[$F{cur_cd}]]></groupExpression>
<groupHeader>
<band splitType="Prevent"/>
</groupHeader>
<groupFooter>
<band height="20">
<textField>
<reportElement x="90" y="0" width="465" height="20"/>
<box leftPadding="0" rightPadding="5">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{cur_cd}+' '+ (new DecimalFormat(",###.00").format($V{v_countMoney}))]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="0" width="90" height="20"/>
<box leftPadding="5">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<text><![CDATA[合计:]]></text>
</staticText>
</band>
</groupFooter>
</group>
<title>
<band height="100" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="555" height="40"/>
<textElement textAlignment="Center">
<font fontName="宋体" size="24" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[汇款财务汇总报表]]></text>
</staticText>
<staticText>
<reportElement x="0" y="40" width="90" height="20"/>
<box leftPadding="5"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<text><![CDATA[查询日期从:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="60" width="90" height="20"/>
<box leftPadding="5"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<text><![CDATA[查询日期至:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="80" width="90" height="20"/>
<box leftPadding="5"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<text><![CDATA[制表日期:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="90" y="40" width="145" height="20"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{START_DATE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="90" y="60" width="145" height="20"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{END_DATE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="90" y="80" width="145" height="20"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[(new SimpleDateFormat("MM/dd/yyyy")).format(new Date())]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="20">
<staticText>
<reportElement x="0" y="0" width="90" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[汇款单号]]></text>
</staticText>
<staticText>
<reportElement x="90" y="0" width="75" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[汇款人]]></text>
</staticText>
<staticText>
<reportElement x="165" y="0" width="70" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[收款人]]></text>
</staticText>
<staticText>
<reportElement x="235" y="0" width="70" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[汇款银行]]></text>
</staticText>
<staticText>
<reportElement x="305" y="0" width="70" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[收款银行]]></text>
</staticText>
<staticText>
<reportElement x="375" y="0" width="60" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[汇款金额]]></text>
</staticText>
<staticText>
<reportElement x="435" y="0" width="60" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[汇款状态]]></text>
</staticText>
<staticText>
<reportElement x="495" y="0" width="60" height="20"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[交易日期]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="20">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="90" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{TX_ID}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="90" y="0" width="75" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{payer_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="165" y="0" width="70" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{payee_name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="235" y="0" width="70" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{payer_bank}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="305" y="0" width="70" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{payee_bank}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="435" y="0" width="60" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["P".equals($F{status})?"汇款处理中":("S".equals($F{status})?"汇款成功":("C".equals($F{status}) ? "汇款取消" : "汇款失败"))]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="375" y="0" width="60" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{cur_cd} + $F{amount}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="495" y="0" width="60" height="20" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center">
<font size="8" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{tx_dttm}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="40" splitType="Stretch">
<staticText>
<reportElement x="470" y="20" width="15" height="20"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[第]]></text>
</staticText>
<textField>
<reportElement x="485" y="20" width="15" height="20"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="500" y="20" width="25" height="20"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[页/共]]></text>
</staticText>
<textField evaluationTime="Report">
<reportElement x="525" y="20" width="15" height="20"/>
<textElement/>
<textFieldExpression class="java.lang.String"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="540" y="20" width="15" height="20"/>
<textElement>
<font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[页]]></text>
</staticText>
</band>
</pageFooter>
</jasperReport>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值