2016-03-23 43 views
1

我正在使用jrxml導出爲RTF格式。 當列數爲12時,它工作正常,否則如果我們增加列數,視圖看起來會失真。Jasper報告導出到RTF無法正常工作

當我用10列輸出它看起來非常好。

我是新來的這個誰能幫助我在這種情況下。

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="PSDefaultPointAndClick" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20"> 
 
\t <property name="ireport.scriptlethandling" value="0"/> 
 
\t <property name="ireport.encoding" value="UTF-8"/> 
 
\t <property name="ireport.zoom" value="1.4641000000000006"/> 
 
\t <property name="ireport.x" value="0"/> 
 
\t <property name="ireport.y" value="0"/> 
 
\t <import value="net.sf.jasperreports.engine.*"/> 
 
\t <import value="java.util.*"/> 
 
\t <import value="net.sf.jasperreports.engine.data.*"/> 
 
\t <parameter name="system.REPORT_NAME" class="java.lang.String" isForPrompting="false"> 
 
\t \t <defaultValueExpression><![CDATA["Default Report"]]></defaultValueExpression> 
 
\t </parameter> 
 
\t <parameter name="config.SUPPORTED_FORMATS" class="java.lang.String" isForPrompting="false"> 
 
\t \t <defaultValueExpression><![CDATA["HTML,PDF,EXCEL,EXCEL_2007,RTF,CSV,POWERPOINT_2007"]]></defaultValueExpression> 
 
\t </parameter> 
 
\t <parameter name="config.FOR_INTERNAL_USE" class="java.lang.String" isForPrompting="false"/> 
 
\t <parameter name="system.REPORT_FOOTER" class="java.lang.String" isForPrompting="false"> 
 
\t \t <defaultValueExpression><![CDATA["Copyright (c) 2007,"]]></defaultValueExpression> 
 
\t </parameter> 
 
\t <parameter name="config.DATASOURCE" class="java.lang.String" isForPrompting="false"> 
 
\t \t <defaultValueExpression><![CDATA["PointAndClick"]]></defaultValueExpression> 
 
\t </parameter> 
 
\t <parameter name="system.RUN_BY_AND_ON_INFO" class="java.lang.String" isForPrompting="false"/> 
 
\t <parameter name="system.GENERATION_DATE" class="java.lang.String" isForPrompting="false"/> 
 
\t <parameter name="system.USER_NAME" class="java.lang.String" isForPrompting="false"/> 
 
\t <parameter name="system.PAGE" class="java.lang.String" isForPrompting="false"/> 
 
\t <parameter name="system.EXPORT_FORMAT" class="java.lang.String" isForPrompting="false"/> 
 
\t <field name="work_id" class="java.lang.String"/> 
 
\t <field name="name" class="java.lang.String"/> 
 
\t <field name="owner" class="java.lang.String"/> 
 
\t <field name="owner_id" class="java.lang.String"/> 
 
\t <field name="status_current" class="java.lang.String"/> 
 
\t <field name="active_gate" class="java.lang.String"/> 
 
\t <field name="active_gate_id" class="java.lang.String"/> 
 
\t <group name="level1"> 
 
\t \t <groupExpression><![CDATA[]]></groupExpression> 
 
\t \t <groupHeader> 
 
\t \t \t <band height="16" splitType="Prevent"> 
 
\t \t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t \t <reportElement key="textField-12" stretchType="RelativeToBandHeight" mode="Opaque" x="54" y="0" width="341" height="16" backcolor="#EBEBEB"/> 
 
\t \t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t \t </box> 
 
\t \t \t \t \t <textElement verticalAlignment="Bottom"> 
 
\t \t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t \t </textElement> 
 
\t \t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Group Level 1 "]]></textFieldExpression> 
 
\t \t \t \t </textField> 
 
\t \t \t </band> 
 
\t \t </groupHeader> 
 
\t \t <groupFooter> 
 
\t \t \t <band height="20" splitType="Prevent"> 
 
\t \t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t \t <reportElement key="textField-22" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="395" height="16" backcolor="#FFFFFF"/> 
 
\t \t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t \t </box> 
 
\t \t \t \t \t <textElement> 
 
\t \t \t \t \t \t <font fontName="Arial" isBold="true" isItalic="false" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t \t </textElement> 
 
\t \t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Summary Level 1 "]]></textFieldExpression> 
 
\t \t \t \t </textField> 
 
\t \t \t </band> 
 
\t \t </groupFooter> 
 
\t </group> 
 
\t <group name="level2"> 
 
\t \t <groupExpression><![CDATA[]]></groupExpression> 
 
\t \t <groupHeader> 
 
\t \t \t <band height="16" splitType="Prevent"> 
 
\t \t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t \t <reportElement key="textField-13" stretchType="RelativeToBandHeight" mode="Opaque" x="99" y="0" width="296" height="16" backcolor="#EBEBEB"/> 
 
\t \t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t \t </box> 
 
\t \t \t \t \t <textElement verticalAlignment="Bottom"> 
 
\t \t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t \t </textElement> 
 
\t \t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Group Level 2 "]]></textFieldExpression> 
 
\t \t \t \t </textField> 
 
\t \t \t </band> 
 
\t \t </groupHeader> 
 
\t \t <groupFooter> 
 
\t \t \t <band height="20" splitType="Prevent"> 
 
\t \t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t \t <reportElement key="textField-21" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="395" height="16" backcolor="#FFFFFF"/> 
 
\t \t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t \t </box> 
 
\t \t \t \t \t <textElement> 
 
\t \t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t \t </textElement> 
 
\t \t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Summary Level 2 "]]></textFieldExpression> 
 
\t \t \t \t </textField> 
 
\t \t \t </band> 
 
\t \t </groupFooter> 
 
\t </group> 
 
\t <group name="level3"> 
 
\t \t <groupExpression><![CDATA[]]></groupExpression> 
 
\t \t <groupHeader> 
 
\t \t \t <band height="16" splitType="Prevent"> 
 
\t \t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t \t <reportElement key="textField-14" stretchType="RelativeToBandHeight" mode="Opaque" x="158" y="0" width="237" height="16" backcolor="#EBEBEB"/> 
 
\t \t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t \t </box> 
 
\t \t \t \t \t <textElement verticalAlignment="Bottom"> 
 
\t \t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t \t </textElement> 
 
\t \t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Group Level 3 "]]></textFieldExpression> 
 
\t \t \t \t </textField> 
 
\t \t \t </band> 
 
\t \t </groupHeader> 
 
\t \t <groupFooter> 
 
\t \t \t <band height="20" splitType="Prevent"> 
 
\t \t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t \t <reportElement key="textField-20" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="395" height="16"/> 
 
\t \t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t \t </box> 
 
\t \t \t \t \t <textElement> 
 
\t \t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t \t </textElement> 
 
\t \t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Summary Level 3 "]]></textFieldExpression> 
 
\t \t \t \t </textField> 
 
\t \t \t </band> 
 
\t \t </groupFooter> 
 
\t </group> 
 
\t <background> 
 
\t \t <band splitType="Stretch"/> 
 
\t </background> 
 
\t <title> 
 
\t \t <band splitType="Stretch"/> 
 
\t </title> 
 
\t <pageHeader> 
 
\t \t <band splitType="Stretch"/> 
 
\t </pageHeader> 
 
\t <columnHeader> 
 
\t \t <band height="16" splitType="Prevent"> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t <reportElement key="textField-4" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="395" height="16" backcolor="#E7EFF7"/> 
 
\t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t <leftPen lineWidth="1.0" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t <rightPen lineWidth="1.0" lineColor="#FFFFFF"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement verticalAlignment="Bottom"> 
 
\t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["ColumnTitle"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t </band> 
 
\t </columnHeader> 
 
\t <detail> 
 
\t \t <band height="16" splitType="Prevent"> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t <reportElement key="textField-11" stretchType="RelativeToBandHeight" mode="Opaque" x="235" y="0" width="160" height="16"/> 
 
\t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"/> 
 
\t \t \t \t <textElement> 
 
\t \t \t \t \t <font fontName="Arial" isBold="false" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Even_Row"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t <reportElement key="textField-16" stretchType="RelativeToBandHeight" mode="Opaque" x="395" y="0" width="140" height="16" backcolor="#FCFAF6"/> 
 
\t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"/> 
 
\t \t \t \t <textElement> 
 
\t \t \t \t \t <font fontName="Arial" isBold="false" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Odd_Row"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t </band> 
 
\t </detail> 
 
\t <columnFooter> 
 
\t \t <band height="20" splitType="Prevent"> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t <reportElement key="textField-17" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="395" height="16"/> 
 
\t \t \t \t <box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0"/> 
 
\t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement> 
 
\t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Column Summary"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t </band> 
 
\t </columnFooter> 
 
\t <pageFooter> 
 
\t \t <band height="42" splitType="Prevent"> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="false"> 
 
\t \t \t \t <reportElement key="textField-26" mode="Opaque" x="0" y="6" width="58" height="36" backcolor="#F5F5F5"/> 
 
\t \t \t \t <box topPadding="3" bottomPadding="2"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <bottomPen lineWidth="0.0" lineColor="#000000"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement textAlignment="Right" verticalAlignment="Middle"> 
 
\t \t \t \t \t <font fontName="Arial" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA[$P{system.PAGE} + " " + $V{PAGE_NUMBER} + " /"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t \t <textField evaluationTime="Report" isBlankWhenNull="false"> 
 
\t \t \t \t <reportElement key="textField-27" mode="Opaque" x="58" y="6" width="59" height="36" backcolor="#F5F5F5"/> 
 
\t \t \t \t <box topPadding="3" bottomPadding="2"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <bottomPen lineWidth="0.0" lineColor="#000000"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement verticalAlignment="Middle"> 
 
\t \t \t \t \t <font fontName="Arial" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t \t <textField isBlankWhenNull="false"> 
 
\t \t \t \t <reportElement key="textField-28" mode="Opaque" x="117" y="6" width="418" height="36" backcolor="#F5F5F5"/> 
 
\t \t \t \t <box topPadding="3" bottomPadding="2" rightPadding="9"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <bottomPen lineWidth="0.0" lineColor="#000000"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement textAlignment="Right" verticalAlignment="Middle"> 
 
\t \t \t \t \t <font fontName="Arial" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA[$P{system.REPORT_FOOTER}]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t </band> 
 
\t </pageFooter> 
 
\t <lastPageFooter> 
 
\t \t <band height="38" splitType="Stretch"> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="false"> 
 
\t \t \t \t <reportElement key="textField-23" mode="Opaque" x="0" y="2" width="58" height="36" backcolor="#F5F5F5"/> 
 
\t \t \t \t <box topPadding="3" bottomPadding="2"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <bottomPen lineWidth="0.0" lineColor="#000000"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement textAlignment="Right" verticalAlignment="Middle"> 
 
\t \t \t \t \t <font fontName="Arial" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA[$P{system.PAGE} + " " + $V{PAGE_NUMBER} + " /"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t \t <textField evaluationTime="Report" isBlankWhenNull="false"> 
 
\t \t \t \t <reportElement key="textField-24" mode="Opaque" x="58" y="2" width="59" height="36" backcolor="#F5F5F5"/> 
 
\t \t \t \t <box topPadding="3" bottomPadding="2"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <bottomPen lineWidth="0.0" lineColor="#000000"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement verticalAlignment="Middle"> 
 
\t \t \t \t \t <font fontName="Arial" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t \t <textField isBlankWhenNull="false"> 
 
\t \t \t \t <reportElement key="textField-25" mode="Opaque" x="117" y="2" width="418" height="36" backcolor="#F5F5F5"/> 
 
\t \t \t \t <box topPadding="3" bottomPadding="2" rightPadding="9"> 
 
\t \t \t \t \t <pen lineWidth="0.0"/> 
 
\t \t \t \t \t <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t \t <bottomPen lineWidth="0.0" lineColor="#000000"/> 
 
\t \t \t \t \t <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement textAlignment="Right" verticalAlignment="Middle"> 
 
\t \t \t \t \t <font fontName="Arial" pdfFontName="Helvetica" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA[$P{system.REPORT_FOOTER}]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t </band> 
 
\t </lastPageFooter> 
 
\t <summary> 
 
\t \t <band height="16" splitType="Stretch"> 
 
\t \t \t <textField isStretchWithOverflow="true" isBlankWhenNull="true"> 
 
\t \t \t \t <reportElement key="textField-18" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="535" height="16"/> 
 
\t \t \t \t <box> 
 
\t \t \t \t \t <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t \t <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> 
 
\t \t \t \t </box> 
 
\t \t \t \t <textElement> 
 
\t \t \t \t \t <font fontName="Arial" isBold="true" pdfFontName="Helvetica-Bold" size="9"/> 
 
\t \t \t \t </textElement> 
 
\t \t \t \t <textFieldExpression class="java.lang.String"><![CDATA["Root Summary"]]></textFieldExpression> 
 
\t \t \t </textField> 
 
\t \t </band> 
 
\t </summary> 
 
</jasperReport>

JRXML文件:

https://www.dropbox.com/s/l866uv4z7sccf2c/12columns.jrxml?dl=0

Screenshot after exporting to RTF

+0

你的樣品有什麼問題? –

+0

我已經添加了12列,但只有6列是可見的休息是不可見的。 – anilthapliyal

+0

您的代碼段 –

回答

0

您不能創建一個頁面尺寸大於22英寸的RTF文檔。 您的報告模板的寬度爲23.11英寸。 我能找到的最佳解釋是here