如何动态减少jrxml带细节高度

时间:2017-05-01 04:22:13

标签: pdf jasper-reports

我有一个带有2个列表元素的乐队。如果两个列表都正确生成数据PDF但是如果1个列表为空,则带宽不会减小并将白色空白放在PDF中。

<?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="liberty_new_bill_format" pageWidth="595" pageHeight="842" columnWidth="571" leftMargin="12" rightMargin="12" topMargin="12" bottomMargin="12" uuid="b6691099-6e36-4db6-a00d-f7d0d2167bd6">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<subDataset name="LW_IDD_CALL" uuid="48484a78-7d0d-4b22-86bd-9ebd1daac462">
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["D:\\Projects\\BE5.0.0\\repository\\Bill Export Format\\"]]></defaultValueExpression>
    </parameter>
    <parameter name="ID_USERNAME" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <queryString language="xPath">
        <![CDATA[/custominfo/multiplerecord[@type="LW_CALL_DETAIL"]/record]]>
    </queryString>
    <field name="CALLDATETIME" class="java.lang.String">
        <fieldDescription><![CDATA[@CALLDATETIME]]></fieldDescription>
    </field>
    <field name="CALLSECTION" class="java.lang.String">
        <fieldDescription><![CDATA[@CALLSECTION]]></fieldDescription>
    </field>
    <field name="CALLTYPE" class="java.lang.String">
        <fieldDescription><![CDATA[@CALLTYPE]]></fieldDescription>
    </field>
    <field name="COUNTRY" class="java.lang.String">
        <fieldDescription><![CDATA[@COUNTRY]]></fieldDescription>
    </field>
    <field name="DURATIONMIN" class="java.lang.String">
        <fieldDescription><![CDATA[@DURATIONMIN]]></fieldDescription>
    </field>
    <field name="DURATIONSEC" class="java.lang.String">
        <fieldDescription><![CDATA[@DURATIONSEC]]></fieldDescription>
    </field>
    <field name="PHONENO" class="java.lang.String">
        <fieldDescription><![CDATA[@PHONENO]]></fieldDescription>
    </field>
    <field name="RATE" class="java.lang.String">
        <fieldDescription><![CDATA[@RATE]]></fieldDescription>
    </field>
    <field name="REFUNDEXISTS" class="java.lang.String">
        <fieldDescription><![CDATA[@REFUNDEXISTS]]></fieldDescription>
    </field>
    <field name="USAGEKB" class="java.lang.String">
        <fieldDescription><![CDATA[@USAGEKB]]></fieldDescription>
    </field>
    <field name="USAGEMB" class="java.lang.String">
        <fieldDescription><![CDATA[@USAGEMB]]></fieldDescription>
    </field>
    <field name="USAGEAMOUNT" class="java.lang.String">
        <fieldDescription><![CDATA[@USAGEAMOUNT]]></fieldDescription>
    </field>
    <field name="LWFORMATPATTERN" class="java.lang.String">
        <fieldDescription><![CDATA[/custominfo/singlerecord/@LWFORMATPATTERN]]></fieldDescription>
    </field>
    <field name="LWMINORUNIT" class="java.lang.String">
        <fieldDescription><![CDATA[/custominfo/singlerecord/@LWMINORUNIT]]></fieldDescription>
    </field>
    <variable name="CDR_COUNT" class="java.lang.Integer" resetType="None" calculation="Count">
        <initialValueExpression><![CDATA[1]]></initialValueExpression>
    </variable>
    <filterExpression><![CDATA[$F{CALLSECTION}.equals("VOICEIDD")]]></filterExpression>
</subDataset>
<subDataset name="LW_IDD_GLOBAL_SMS" uuid="428c32be-39c8-425e-ba21-10f73f94cdbf">
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["D:\\Projects\\BE5.0.0\\repository\\Bill Export Format\\"]]></defaultValueExpression>
    </parameter>
    <parameter name="ID_USERNAME" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <queryString language="xPath">
        <![CDATA[/custominfo/multiplerecord[@type="LW_CALL_DETAIL"]/record]]>
    </queryString>
    <field name="LWMINORUNIT" class="java.lang.String">
        <fieldDescription><![CDATA[/custominfo/singlerecord/@LWMINORUNIT]]></fieldDescription>
    </field>
    <field name="LWFORMATPATTERN" class="java.lang.String">
        <fieldDescription><![CDATA[/custominfo/singlerecord/@LWFORMATPATTERN]]></fieldDescription>
    </field>
    <field name="CALLDATETIME" class="java.lang.String">
        <fieldDescription><![CDATA[@CALLDATETIME]]></fieldDescription>
    </field>
    <field name="CALLSECTION" class="java.lang.String">
        <fieldDescription><![CDATA[@CALLSECTION]]></fieldDescription>
    </field>
    <field name="CALLTYPE" class="java.lang.String">
        <fieldDescription><![CDATA[@CALLTYPE]]></fieldDescription>
    </field>
    <field name="COUNTRY" class="java.lang.String">
        <fieldDescription><![CDATA[@COUNTRY]]></fieldDescription>
    </field>
    <field name="DURATIONMIN" class="java.lang.String">
        <fieldDescription><![CDATA[@DURATIONMIN]]></fieldDescription>
    </field>
    <field name="DURATIONSEC" class="java.lang.String">
        <fieldDescription><![CDATA[@DURATIONSEC]]></fieldDescription>
    </field>
    <field name="PHONENO" class="java.lang.String">
        <fieldDescription><![CDATA[@PHONENO]]></fieldDescription>
    </field>
    <field name="RATE" class="java.lang.String">
        <fieldDescription><![CDATA[@RATE]]></fieldDescription>
    </field>
    <field name="REFUNDEXISTS" class="java.lang.String">
        <fieldDescription><![CDATA[@REFUNDEXISTS]]></fieldDescription>
    </field>
    <field name="USAGEKB" class="java.lang.String">
        <fieldDescription><![CDATA[@USAGEKB]]></fieldDescription>
    </field>
    <field name="USAGEMB" class="java.lang.String">
        <fieldDescription><![CDATA[@USAGEMB]]></fieldDescription>
    </field>
    <field name="USAGEAMOUNT" class="java.lang.String">
        <fieldDescription><![CDATA[@USAGEAMOUNT]]></fieldDescription>
    </field>
    <variable name="CDR_COUNT" class="java.lang.Integer" resetType="None" calculation="Count">
        <initialValueExpression><![CDATA[1]]></initialValueExpression>
    </variable>
    <filterExpression><![CDATA[$F{CALLSECTION}.equals("SMSIDD")]]></filterExpression>
</subDataset>
<queryString language="xPath">
    <![CDATA[/custominfo]]>
</queryString>
<field name="LWFORMATPATTERN" class="java.lang.String">
    <fieldDescription><![CDATA[singlerecord/@LWFORMATPATTERN]]></fieldDescription>
</field>
<field name="LWMINORUNIT" class="java.lang.String">
    <fieldDescription><![CDATA[singlerecord/@LWMINORUNIT]]></fieldDescription>
</field>
<field name="SMSIDDAMOUNT" class="java.lang.String">
    <fieldDescription><![CDATA[singlerecord/@SMSIDDAMOUNT]]></fieldDescription>
</field>
<field name="VOICEIDDAMOUNT" class="java.lang.String">
    <fieldDescription><![CDATA[singlerecord/@VOICEIDDAMOUNT]]></fieldDescription>
</field>
<variable name="IDD_AMOUNT_SUM" class="java.lang.Double" calculation="Sum">
    <variableExpression><![CDATA[Double.parseDouble($F{VOICEIDDAMOUNT}.replace( " ", "0" )) + Double.parseDouble($F{SMSIDDAMOUNT}.replace( " ", "0" ))]]></variableExpression>
</variable>
<background>
    <band splitType="Stretch"/>
</background>
<title>
    <band splitType="Stretch"/>
</title>
<pageHeader>
    <band splitType="Stretch"/>
</pageHeader>
<columnHeader>
    <band/>
</columnHeader>
<detail>
    <band height="182" splitType="Stretch">
        <frame>
            <reportElement mode="Opaque" x="26" y="12" width="515" height="170" isRemoveLineWhenBlank="true" uuid="7cb21acd-38f6-4987-9ae9-a5957b70f88c"/>
            <box>
                <pen lineWidth="0.25" lineColor="#CCCCCC"/>
                <topPen lineWidth="0.25" lineColor="#CCCCCC"/>
                <leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
                <bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
                <rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
            </box>
            <frame>
                <reportElement mode="Opaque" x="0" y="0" width="515" height="27" isRemoveLineWhenBlank="true" backcolor="#F0F0F0" uuid="7a36219e-de1d-461c-b90b-b0ce10791200"/>
                <staticText>
                    <reportElement mode="Transparent" x="6" y="0" width="116" height="27" forecolor="#000000" backcolor="#FFFFFF" uuid="afa2f370-fd5f-490f-9c62-7ce5ecbe86bd"/>
                    <textElement textAlignment="Left" verticalAlignment="Middle">
                        <font fontName="Open Sans Extrabold" size="11" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Data]]></text>
                </staticText>
            </frame>
            <frame>
                <reportElement x="0" y="40" width="515" height="57" isRemoveLineWhenBlank="true" uuid="3b661c38-6d27-441e-b137-c2054790863d">
                    <printWhenExpression><![CDATA[Double.parseDouble($F{VOICEIDDAMOUNT}.replace( " ", "0" )) > 0]]></printWhenExpression>
                </reportElement>
                <staticText>
                    <reportElement mode="Transparent" x="325" y="21" width="60" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="d89d85f3-6c4e-4033-9bdd-0d3eb4da5017"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Phone #]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="7" y="21" width="100" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="b086e195-0b0b-4d64-9545-1deb2ca5f10f"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Date & Time]]></text>
                </staticText>
                <componentElement>
                    <reportElement positionType="Float" x="0" y="37" width="515" height="20" isRemoveLineWhenBlank="true" uuid="f19ffb57-efe4-4c20-84f8-2b0de599a0e3"/>
                    <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
                        <datasetRun subDataset="LW_IDD_CALL" uuid="247b3030-df73-4c6a-9ca8-3ada738c308f">
                            <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)
                    $P{REPORT_DATA_SOURCE}).dataSource("/custominfo/multiplerecord[@type='LW_CALL_DETAIL']/record")]]></dataSourceExpression>
                        </datasetRun>
                        <jr:listContents height="20" width="515">
                            <textField>
                                <reportElement x="7" y="0" width="100" height="20" uuid="0f79a5c5-2964-481c-9192-963b630d05c7"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{CALLDATETIME}]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="402" y="0" width="46" height="20" uuid="92bc22ad-6a29-4e3b-858d-261755960bbb"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA["$" + new DecimalFormat($F{LWFORMATPATTERN}).format((Double.parseDouble($F{RATE}.replace( " ", "0" ))/java.lang.Math.pow( 10,new java.lang.Double($F{LWMINORUNIT})))) + "/min"]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="465" y="0" width="45" height="20" uuid="4cdad71e-93f6-4692-9bec-3eb427551e5c"/>
                                <textElement textAlignment="Right" verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA["$" + new DecimalFormat($F{LWFORMATPATTERN}).format((Double.parseDouble($F{USAGEAMOUNT}.replace( " ", "0" ))/java.lang.Math.pow( 10,new java.lang.Double($F{LWMINORUNIT}))))]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="325" y="0" width="60" height="20" uuid="a4ec29dd-a2ee-47f6-a042-9070b29edaff"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{PHONENO}]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="170" y="0" width="110" height="20" uuid="1ff085d3-3a74-402b-adf1-254d26dd87eb"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{COUNTRY}]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="110" y="0" width="50" height="20" uuid="8f7f0b18-8d85-42fe-9078-aac4db6834cb"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[new DecimalFormat("#,##00").format((Double.parseDouble($F{DURATIONMIN}.replace( " ", "0" )))) + ":" +new DecimalFormat("#,##00").format((Double.parseDouble($F{DURATIONSEC}.replace( " ", "0" ))))]]></textFieldExpression>
                            </textField>
                        </jr:listContents>
                    </jr:list>
                </componentElement>
                <staticText>
                    <reportElement mode="Transparent" x="401" y="21" width="46" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="384a4fa0-f294-4f52-9f6e-80ca0570ceff"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Rate]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="110" y="21" width="50" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fc4734-c8e4-4aaf-9ff4-bc1638a6f5a5"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Duration]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="170" y="21" width="110" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="16ff4b2c-8087-4f52-8533-12d8f15263d7"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Country]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="465" y="21" width="45" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a023ec4d-97aa-4a40-8408-673e5d4f726d"/>
                    <textElement textAlignment="Right" verticalAlignment="Middle">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Amount]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="7" y="0" width="116" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="0e87bb45-f29a-4a50-b9d1-846f1d7ae575"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="9" isBold="true"/>
                    </textElement>
                    <text><![CDATA[IDD Calls]]></text>
                </staticText>
            </frame>
            <frame>
                <reportElement positionType="Float" x="0" y="100" width="515" height="10" isRemoveLineWhenBlank="true" uuid="0ccd7e2c-e134-4964-8b57-38fdd6ae78d3">
                    <printWhenExpression><![CDATA[Double.parseDouble($F{VOICEIDDAMOUNT}.replace( " ", "0" )) > 0 && Double.parseDouble($F{SMSIDDAMOUNT}.replace( " ", "0" )) > 0]]></printWhenExpression>
                </reportElement>
                <line>
                    <reportElement x="12" y="5" width="491" height="1" uuid="fab0c382-b32d-4809-8078-668a82dd86eb"/>
                </line>
            </frame>
            <frame>
                <reportElement positionType="Float" x="0" y="115" width="515" height="55" isRemoveLineWhenBlank="true" uuid="215cc558-db31-40ab-ba16-50b0d7b3b77a">
                    <printWhenExpression><![CDATA[Double.parseDouble($F{SMSIDDAMOUNT}.replace( " ", "0" )) > 0]]></printWhenExpression>
                </reportElement>
                <box>
                    <pen lineWidth="0.0"/>
                    <topPen lineWidth="0.0"/>
                    <leftPen lineWidth="0.0"/>
                    <bottomPen lineWidth="0.0"/>
                    <rightPen lineWidth="0.0"/>
                </box>
                <staticText>
                    <reportElement mode="Transparent" x="324" y="21" width="60" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a67a56df-8e16-45e5-88fa-91c9e4a26063"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Phone #]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="7" y="21" width="100" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="ec0e8108-c5e4-45c0-ba77-1b8f3373ac9e"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Date & Time]]></text>
                </staticText>
                <componentElement>
                    <reportElement positionType="Float" x="0" y="36" width="515" height="18" isRemoveLineWhenBlank="true" uuid="785a5bd6-9654-4f46-aed3-d6c0d9b8a10c"/>
                    <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
                        <datasetRun subDataset="LW_IDD_GLOBAL_SMS" uuid="0ed48425-e6d9-43c5-bc52-d117944c13a6">
                            <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)
                    $P{REPORT_DATA_SOURCE}).dataSource("/custominfo/multiplerecord[@type='LW_CALL_DETAIL']/record")]]></dataSourceExpression>
                        </datasetRun>
                        <jr:listContents height="18" width="515">
                            <textField>
                                <reportElement x="7" y="0" width="100" height="18" uuid="0744b38a-7fe9-4b59-82d0-28779b2136bb"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{CALLDATETIME}]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="465" y="0" width="45" height="18" uuid="4352e775-ad18-4207-a28b-01c828971608"/>
                                <textElement textAlignment="Right" verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA["$" + new DecimalFormat($F{LWFORMATPATTERN}).format((Double.parseDouble($F{USAGEAMOUNT}.replace( " ", "0" ))/java.lang.Math.pow( 10,new java.lang.Double($F{LWMINORUNIT}))))]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="325" y="0" width="60" height="18" uuid="be557830-7c4c-4125-a14a-a341cf8b1499"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{PHONENO}]]></textFieldExpression>
                            </textField>
                            <textField>
                                <reportElement x="170" y="0" width="110" height="18" uuid="06bc7ad5-5d31-4143-9525-12dedb210239"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="Open Sans" size="8"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{COUNTRY}]]></textFieldExpression>
                            </textField>
                        </jr:listContents>
                    </jr:list>
                </componentElement>
                <staticText>
                    <reportElement mode="Transparent" x="465" y="21" width="45" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a758b1c2-29f7-4d18-af29-e262330fff2c"/>
                    <textElement textAlignment="Right" verticalAlignment="Middle">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Amount]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="170" y="21" width="110" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="367c8854-61db-4320-8712-508366f66bfa"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Country]]></text>
                </staticText>
                <staticText>
                    <reportElement mode="Transparent" x="6" y="0" width="116" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="774c12ff-1e22-42d1-adb7-4493b49f10e1"/>
                    <textElement textAlignment="Left" verticalAlignment="Top">
                        <font fontName="Open Sans" size="9" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Global SMS]]></text>
                </staticText>
            </frame>
        </frame>
    </band>
    <band height="119">
        <frame>
            <reportElement positionType="Float" mode="Opaque" x="26" y="22" width="515" height="85" isRemoveLineWhenBlank="true" uuid="9b01e260-764e-460d-9741-d2f0ae1216f3"/>
            <box>
                <pen lineWidth="0.25" lineColor="#CCCCCC"/>
                <topPen lineWidth="0.25" lineColor="#CCCCCC"/>
                <leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
                <bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
                <rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
            </box>
            <frame>
                <reportElement mode="Opaque" x="0" y="0" width="515" height="27" isRemoveLineWhenBlank="true" backcolor="#F0F0F0" uuid="1b389123-b4b6-446b-abd1-67185b88eaf8"/>
                <staticText>
                    <reportElement mode="Transparent" x="6" y="0" width="116" height="27" forecolor="#000000" backcolor="#FFFFFF" uuid="d3813577-f9cd-478b-9604-0416ef46254b"/>
                    <textElement textAlignment="Left" verticalAlignment="Middle">
                        <font fontName="Open Sans Extrabold" size="11" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Charges]]></text>
                </staticText>
            </frame>
        </frame>
    </band>
</detail>
<columnFooter>
    <band/>
</columnFooter>
<pageFooter>
    <band height="46" splitType="Stretch"/>
</pageFooter>

我们正在使用xml数据源。

<?xml version = '1.0' encoding = 'UTF-8'?><custominfo><singlerecord ACCOUNTNAME="BHADRINATH RAMACHANDRAN" ACCOUNTNUMBER="LW555358" ACCOUNTTYPEID="ACT06" ADDONDATAAMOUNT="600" ADDONDATAQUOTA="1" ADDONSMSAMOUNT="0" ADDONSMSQUOTA="0" ADDONVOICEAMOUNT="0" ADDONVOICEQUOTA="0" ADDRESS="Liberty Wireless  #221  Henderson Road, #06-04 Singapore 310231" ADDRESS1="Liberty Wireless  #221  Henderson Road, #06-04" ADDRESS2="Liberty Wireless, #221, Henderson Road;06;04;" ADDRESSTYPEID="ADT02" ADJUSTMENT="0" ADJUSTMENTAMOUNT="0" ADJUSTMENT_AMOUNT="0" ADVANCEPAYMENTAMOUNT="0" ADVANCEPERIOD="01-31 May 2017" ADVANCE_PAYAMOUNT="0" ADVANCE_PAYAMOUNT_DATE="" ADV_FROMDATE="01 May 2017" ADV_TODATE="31 May 2017" ALIAS="SGD" AUTOBOOSTAMOUNT="0" AUTOBOOSTDATAUSED="0" AUTOBOOSTQUOTA="0" AUTO_BOOST_DATA="0" AUTO_BOOST_USAGE="0" AUTO_TOPUP_AMOUNT="0" BASEAMOUNT="2800" BASEDATAQUOTA="3" BASEDATAUSED="2.6" BASESMSQUOTA="0" BASEVOICEQUOTA="100" BASE_AMOUNT="2800" BASE_COMPONENT_DATA_VOLUME="8.25" BASE_DATA_VOLUME="3" BASE_SMS_COUNT="0" BASE_USAGE="2.54" BASE_VOICE_MIN="0" BILLAMOUNT="4205" BILLDATE="01 May 2017" BILLINGAREANAME="Default" BILLPERIOD="01-30 Apr 2017" BONUSDATAUSED="4.2" BONUSQUOTA="3.1" BONUS_DATA="4348" BONUS_USAGE="4340" BOOSTAMOUNT="0" BOOSTDATAUSED="0" BOOSTQUOTA="0" BOOST_DATA="0" BOOST_ONLY_AMOUNT="0" BOOST_USAGE="0" CIRCLECREDITAMOUNT="0" CITYNAME="Singapore" COMPONENT_AMOUNT="600" COMPONENT_DATA_AMOUNT="600" COMPONENT_DATA_VOLUME="1" COMPONENT_SMS_AMOUNT="0" COMPONENT_SMS_COUNT="0" COMPONENT_VOICE_AMOUNT="0" COMPONENT_VOICE_MIN="0" COUNTRYNAME="Singapore" CREATEDATE="27 Apr 2017" CURRENCYNAME=" " CURRENTBILLCHARGE="4205" CURR_BASE_DATA_VOLUME="3" CURR_BASE_SMS_COUNT="0" CURR_BASE_VOICE_MIN="100" CURR_BONUS_DATA="3.1" CURR_COMPONENT_DATA_VOLUME="1" CURR_COMPONENT_SMS_COUNT="0" CURR_COMPONENT_VOICE_MIN="0" DATAROAMAMOUNT="0" DATA_ROAMING_AMOUNT="0" DEBITDOCUMENTID="DBD000702898" DEBITDOCUMENTNUMBER="REG0000001377872" DEBITPAYMENTAMOUNT="4525" DEBIT_PAYAMOUNT="4525" DEBIT_PAYAMOUNT_DATE="07 Apr 2017" DEPOSITCHARGE="0" DEPOSITPAID="0" DUEDATE="08 May 2017" EMAILID="bhadrinath@circles.asia" EXADJUSTEDAMOUNT="0" EXDEPOSIT="0" EXDISCOUNT="0" EXDISCOUNTABLE="4205" EXDISCOUNTED="0" EXLATEPAYMENTAMOUNT="0" EXPREVIOUSBALANCEAMOUNT="0" EXPREVIOUSBILLAMOUNT="4525" EXPREVIOUSCREDITAMOUNT="0" EXPREVIOUSDEBITAMOUNT="0" EXPREVIOUSPAYMENTAMOUNT="4525" EXROUNDEDAMOUNT="0" EXROUNDINGAMOUNT="0" EXSUBTOTAL="3971" EXSURCHARGE="0" EXTAX="234" EXTAXABLE="0" EXTOTALAMOUNT="4205" EXTOTALDUE="4205" EXTOTALEARLYPAYMENTAMOUNT="0" EXTOTALLATEPAYMENTAMOUNT="4205" EXTOTALUNROUNDEDBILLAMOUNT="0" FORMATPATTERN="#,##0.00" FROMDATE="01 Apr 2017" GST="234" HOME_IC_AMOUNT="0" HOME_IC_MIN="0" HOME_OG_AMOUNT="759.5" HOME_OG_MIN="6" HOME_USAGE_VOICE_AMOUNT="0" HOME_USAGE_VOICE_MIN="0" IDD_BUDGET_AMOUNT="0" IDD_BUDGET_MIN="0" IDD_BUDGET_SEC="0" IDD_NORMAL_AMOUNT="760" IDD_NORMAL_MIN="5" IDD_NORMAL_SEC="54" IDD_USAGE_SMS_AMOUNT="0" IDD_USAGE_SMS_COUNT="0" IMG=" " INVOICENUMBER="REG0000001377872" LASTBILLDATE="01 Apr 2017" LOCALMMSAMOUNT="0" LOCALMMSCOUNT="0" LOCALSMSAMOUNT="0" LOCALSMSCOUNT="0" LOCALVOICEAMOUNTUSED="0" LOCALVOICEMINUSED="0" LOCAL_USAGE_AMOUNT="0" LOCAL_USAGE_DATA_VOLUME="6.92" LOCAL_USAGE_MMS_AMOUNT="0" LOCAL_USAGE_MMS_COUNT="0" LOCAL_USAGE_SMS_AMOUNT="0" LOCAL_USAGE_SMS_COUNT="0" LWACCOUNTNUMBER="LW555358" LWBILLDATE="01 May 2017" LWFORMATPATTERN="#,##0.00" LWMINORUNIT="2" LWTOTALTAXEXEMPTION="604.55" MAJORNAME="SGD" MAJORSYMBOL="$" MINORUNIT="2" MOBILENO="87423009" NAME="BHADRINATH RAMACHANDRAN" NONRECCHARGE="0" OC_AMOUNT="0" ONETIMEAMOUNT="0" PLUSAMOUNT="200" PLUS_AMOUNT="200" PREVIOUSBILLAMOUNT="4525" PRE_BASE_AMOUNT="0" PRE_BASE_DATA="3" PRE_BASE_SMS="0" PRE_BASE_VOICE="0" PRE_COMPONENT_DATA="1" PRE_COMPONENT_DATA_AMOUNT="0" PRE_COMPONENT_SMS="0" PRE_COMPONENT_SMS_AMOUNT="0" PRE_COMPONENT_VOICE="0" PRE_COMPONENT_VOICE_AMOUNT="0" PROADDONDATAAMOUNT="0" PROADDONDATAQUOTA="1" PROADDONSMSAMOUNT="0" PROADDONSMSQUOTA="0" PROADDONVOICEAMOUNT="0" PROADDONVOICEQUOTA="0" PROBASEAMOUNT="0" PROBASEDATAQUOTA="3" PROBASESMSQUOTA="0" PROBASEVOICEQUOTA="0" PROBONUSQUOTA="4.2" PRS_AMOUNT="0" RECCHARGE="3365" RECFIXRECCHARGE="0" ROAMING_USAGE_AMOUNT="0" SMSIDDAMOUNT="0" SMSROAMAMOUNT="0" SMS_ROAMING_AMOUNT="0" SMS_ROAMING_COUNT="0" SPECIAL_USAGE_AMOUNT="759.5" STATENAME="Singapore" TODATE="30 Apr 2017" TOTALCREDIT="0" TOTALDEBIT="0" TOTALTAXEXEMPTION="604.55" TXT="Please login to www.example.com to pay your bill." UNLIMITEDICCALLSAMOUNT="0" USAGECHARGE="606" USERNAME="BHADRINATH RAMACHANDRAN" VOICEIDDAMOUNT="759.5" VOICEROAMAMOUNT="0" VOICE_ROAMING_AMOUNT="0" ZIP="310231"/><multiplerecord type="LW_CALL_DETAIL">
  <record CALLDATETIME="10 Apr 2017 - 22:44" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="India" DURATIONMIN="1" DURATIONSEC="0" PHONENO="919444281907" RATE="150" REFUNDEXISTS="N" USAGEAMOUNT="150" USAGEKB="0" USAGEMB="0"/>
  <record CALLDATETIME="19 Apr 2017 - 06:37" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="Philippines" DURATIONMIN="1" DURATIONSEC="0" PHONENO="639175620965" RATE="90" REFUNDEXISTS="N" USAGEAMOUNT="90" USAGEKB="0" USAGEMB="0"/>
  <record CALLDATETIME="24 Apr 2017 - 16:31" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="HongKong" DURATIONMIN="1" DURATIONSEC="0" PHONENO="85239704983" RATE="70.0000000000000000000000000000000000002" REFUNDEXISTS="N" USAGEAMOUNT="70" USAGEKB="0" USAGEMB="0"/>
  <record CALLDATETIME="25 Apr 2017 - 18:16" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="India" DURATIONMIN="1" DURATIONSEC="54" PHONENO="918861871977" RATE="155" REFUNDEXISTS="N" USAGEAMOUNT="294.5" USAGEKB="0" USAGEMB="0"/>
  <record CALLDATETIME="28 Apr 2017 - 09:37" CALLSECTION="VOICEIDD" CALLTYPE="Outgoing" COUNTRY="India" DURATIONMIN="1" DURATIONSEC="0" PHONENO="919444281907" RATE="155" REFUNDEXISTS="N" USAGEAMOUNT="155" USAGEKB="0" USAGEMB="0"/></multiplerecord></custominfo>

示例数据源

1 个答案:

答案 0 :(得分:0)

Jasper 5.6版有一些错误,它不允许频段高度自动降低,但在更新到6.3.1后问题似乎是固定的,并且频段高度动态变化。