RTF文件未正确生成

时间:2013-05-09 05:58:59

标签: jasper-reports

我正在使用 iReport Designer 5.0.4 来设计JRXML。

它正在生成RTF文件,但是在单个左列中对齐但不是所需的,而相同的jrxml能够以所需的格式生成PDF。

所需的输出格式为 -

Column1       Column2           Column3 

Data1             Data2                 Data3

Data1             Data2                 Data3  

RTF中生成的输出为 -

Column1

Column2

Column3

Data1

Data2

Data3

Data1

Data2

Data3

Data1

Data2

Data3

任何帮助都会很明显。

JRXML:

<?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" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="db53b752-4226-470a-9333-d8eac1b5b2db">
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="Column0" class="java.lang.String"/>
    <field name="Column1" class="java.lang.String"/>
    <field name="Column2" class="java.lang.String"/>
    <field name="Column3" class="java.lang.String"/>
    <field name="Column4" class="java.lang.String"/>
    <field name="Column5" class="java.lang.String"/>
    <field name="Column6" class="java.lang.String"/>
    <field name="Column7" class="java.lang.String"/>
    <field name="Column8" class="java.lang.String"/>
    <field name="Column9" class="java.lang.String"/>
    <field name="Column10" class="java.lang.String"/>
    <field name="Column11" class="java.lang.String"/>
    <field name="Column12" class="java.lang.String"/>
    <field name="Column13" class="java.lang.String"/>
    <field name="Column14" class="java.lang.String"/>
    <field name="Column15" class="java.lang.String"/>
    <field name="Column16" class="java.lang.String"/>
    <field name="Column17" class="java.lang.String"/>
    <field name="Column18" class="java.lang.String"/>
    <field name="Column19" class="java.lang.String"/>
    <field name="Column20" class="java.lang.String"/>
    <field name="Column21" class="java.lang.String"/>
    <field name="Column22" class="java.lang.String"/>
    <field name="Column23" class="java.lang.String"/>
    <field name="Column24" class="java.lang.String"/>
    <field name="Column25" class="java.lang.String"/>
    <field name="Column26" class="java.lang.String"/>
    <variable name="Column21_1" class="java.lang.Integer" resetType="Column" calculation="Count">
        <variableExpression><![CDATA[$F{Column21}]]></variableExpression>
    </variable>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch">
            <staticText>
                <reportElement uuid="86f25082-e1c1-4243-b82a-070c18046bf0" x="122" y="16" width="293" height="48"/>
                <textElement>
                    <font size="20" isBold="true" isItalic="true"/>
                </textElement>
                <text><![CDATA[       Brazil Profitablity Report]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="fdab3d33-26f0-4d36-8b92-2c5598815e9f" x="452" y="39" width="100" height="20"/>
                <textElement/>
                <text><![CDATA[B/L Account]]></text>
            </staticText>
            <textField>
                <reportElement uuid="573638aa-cf07-44c0-bbc1-d7429de0b362" x="455" y="59" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column6}]]></textFieldExpression>
            </textField>
        </band>
    </title>
    <pageHeader>
        <band height="35" splitType="Stretch"/>
    </pageHeader>
    <columnHeader>
        <band height="61" splitType="Stretch">
            <staticText>
                <reportElement uuid="65f72c41-53b7-4996-a1ac-b04b5c4510c2" x="22" y="40" width="100" height="20"/>
                <textElement/>
                <text><![CDATA[Account Id]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="f5abd43e-0af5-4a1d-a2a4-a23b60756736" x="142" y="41" width="97" height="19"/>
                <textElement/>
                <text><![CDATA[Contract Number]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="e907d120-83c3-41b5-968f-02f0dfe1af06" x="389" y="40" width="100" height="20"/>
                <textElement/>
                <text><![CDATA[Accrual]]></text>
            </staticText>
            <staticText>
                <reportElement uuid="1abdb505-6b2c-4271-9dbe-21ae6c0c8135" x="259" y="40" width="100" height="20"/>
                <textElement/>
                <text><![CDATA[Value]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="120">
            <textField>
                <reportElement uuid="a9ef8cc5-5a55-4558-8755-586833fdb992" x="22" y="0" width="100" height="20"/>
                <textElement>
                    <paragraph lineSpacing="Single"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Column5}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="c519d44e-ab0d-4b36-9611-3e4e90aa4fd8" x="259" y="0" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column13}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="dba9735a-d79c-43f8-941d-36c17dc5c2eb" x="142" y="5" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column4}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement uuid="e9b47016-99c0-4e52-8a04-816bee490a1b" x="389" y="10" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column21}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
    <columnFooter>
        <band height="45" splitType="Stretch">
            <staticText>
                <reportElement uuid="03e3e8fc-71de-41d3-990d-760d19c645ae" x="403" y="5" width="100" height="20"/>
                <textElement/>
                <text><![CDATA[Sum Of Accrual]]></text>
            </staticText>
            <textField>
                <reportElement uuid="57528492-a801-4182-9399-9ad0830bed4a" x="403" y="25" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$V{Column21_1}]]></textFieldExpression>
            </textField>
        </band>
    </columnFooter>
    <pageFooter>
        <band height="54" splitType="Stretch">
            <textField>
                <reportElement uuid="a8add0b4-674b-46e7-8731-edde2fbf1867" x="455" y="34" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/>
    </summary>
</jasperReport>

0 个答案:

没有答案