Jasper reports 如何对齐列页脚中的合计字段?

Jasper reports 如何对齐列页脚中的合计字段?,jasper-reports,Jasper Reports,我已经在Jasper iReport中创建了一个报告。但是,中字段的对齐方式并不像我所希望的那样合适 我已经在详细信息栏中添加了日期和短信数量,在列栏中添加了短信总数。当我在detail band中有短信总数时,它会迭代并显示多次 短信计数报告图像: XML代码是 <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperre

我已经在Jasper iReport中创建了一个报告。但是,中字段的对齐方式并不像我所希望的那样合适

我已经在
详细信息栏中添加了日期和短信数量
,在
列栏中添加了短信总数
。当我在
detail band
中有短信总数时,它会迭代并显示多次

短信计数报告图像:

XML代码是

  <?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="smsCount" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<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["C:\\Users\\NIC\\Desktop\\report\\"]]></defaultValueExpression>
</parameter>
<parameter name="fromDate" class="java.util.Date"/>
<parameter name="toDate" class="java.util.Date"/>
<queryString>
    <![CDATA[select (select sum(sent_count) from IMMIGRATION.OVERSTAY_SENT_SMS_COUNT  where sent_date between $P{fromDate} and $P{toDate}) totalCount,to_char(sent_date,'dd-mm-yyyy') sent_date,sent_count from IMMIGRATION.OVERSTAY_SENT_SMS_COUNT where sent_date
between $P{fromDate} and $P{toDate}]]>
</queryString>
<field name="TOTALCOUNT" class="java.math.BigDecimal"/>
<field name="SENT_DATE" class="java.lang.String"/>
<field name="SENT_COUNT" class="java.math.BigDecimal"/>
<background>
    <band splitType="Stretch"/>
</background>
<title>
    <band height="83" splitType="Stretch">
        <staticText>
            <reportElement x="122" y="21" width="420" height="48" forecolor="#FF9999"/>
            <textElement>
                <font size="30"/>
            </textElement>
            <text><![CDATA[National Informatic Center]]></text>
        </staticText>
    </band>
</title>
<pageHeader>
    <band height="35" splitType="Stretch">
        <staticText>
            <reportElement x="234" y="0" width="139" height="24"/>
            <textElement>
                <font size="14" isUnderline="true"/>
            </textElement>
            <text><![CDATA[SMS Count Reports]]></text>
        </staticText>
    </band>
</pageHeader>
<columnHeader>
    <band height="28" splitType="Stretch">
        <staticText>
            <reportElement mode="Transparent" x="61" y="0" width="100" height="20" backcolor="#CCCCCC"/>
            <textElement textAlignment="Center">
                <font size="12"/>
            </textElement>
            <text><![CDATA[Date]]></text>
        </staticText>
        <staticText>
            <reportElement x="404" y="0" width="100" height="20" backcolor="#CCCCCC"/>
            <textElement textAlignment="Center">
                <font size="12"/>
            </textElement>
            <text><![CDATA[SMS Count]]></text>
        </staticText>
    </band>
</columnHeader>
<detail>
    <band height="35" splitType="Stretch">
        <textField>
            <reportElement x="61" y="9" width="100" height="20" backcolor="#FFFFFF"/>
            <textElement textAlignment="Center"/>
            <textFieldExpression><![CDATA[$F{SENT_DATE}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="404" y="9" width="100" height="20"/>
            <textElement textAlignment="Center"/>
            <textFieldExpression><![CDATA[$F{SENT_COUNT}]]></textFieldExpression>
        </textField>
    </band>
</detail>
<columnFooter>
    <band height="35">
        <textField>
            <reportElement x="404" y="0" width="100" height="20"/>
            <textElement textAlignment="Center"/>
            <textFieldExpression><![CDATA[$F{TOTALCOUNT}]]></textFieldExpression>
        </textField>
        <staticText>
            <reportElement x="291" y="0" width="113" height="20"/>
            <textElement>
                <font isItalic="true"/>
            </textElement>
            <text><![CDATA[     Total SMS Count=]]></text>
        </staticText>
    </band>
</columnFooter>

在报表属性中激活“浮动列页脚”

在报告属性中激活“浮动列页脚”


您使用的是什么iReport版本?
尝试将“短信总数”作为页脚放在另一个页脚级别。

您使用的是哪个iReport版本?
尝试把“总SMS计数”放在页脚的另一个页脚上。

考虑接受最佳答案(绿色答案旁边回答你的预想),看考虑接受最佳答案(绿色检查旁边回答你更喜欢),看@阿图拉伊:乐意帮助。如果你认为我的回答最有帮助,请大家看看。如果你认为我的回答最有帮助,请大家看看。