gpt4 book ai didi

jasper-reports - 从 jasper 导出时 excel 文件中的空列

转载 作者:行者123 更新时间:2023-12-02 17:25:28 25 4
gpt4 key购买 nike

我正在使用 jasper 报告 3.7.6。我有一个要导出到 excel 的列表。我可以将列表导出到 excel,但是我的 excel 中出现许多隐藏的列和行。如何删除这些隐藏的列和行?

我的代码是这样的:

JasperPrint jasperPrint;  

JRBeanCollectionDataSource beanCollectionDataSource=new JRBeanCollectionDataSource(lstScoreSheet);
String reportPath= FacesContext.getCurrentInstance().getExternalContext().getRealPath("/reports/[![enter image description here][1]][1]ScoreSheet.jasper");

jasperPrint=JasperFillManager.fillReport(reportPath, getParameters(batchYr),beanCollectionDataSource);
HttpServletResponse httpServletResponse1=(HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
httpServletResponse1.addHeader("Content-disposition", "attachment; filename=report.xls");
ServletOutputStream servletOutputStream=httpServletResponse1.getOutputStream();

JExcelApiExporter exporterXLS = new JExcelApiExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, servletOutputStream);
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE);
exporterXLS.exportReport();

excel文件图片: enter image description here

这里的 A、C、E 列......都是空的和隐藏的。我想删除那些隐藏的列。

我的 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="ScoreSheet" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="3.897434200000008"/>
<property name="ireport.x" value="2104"/>
<property name="ireport.y" value="122"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.column.width" value="100"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="detectCellType" value="true"/>
<property name="onePagePerSheet" value="false"/>
<property name="whitePageBackground" value="false"/>
<property name="ignoreGraphics" value="false"/>
<property name="collapseRowSpan" value="true"/>
<property name="ignoreCellBorder" value="true"/>
<property name="fontSizeFixEnabled" value="true"/>
<property name="maximumRowsPerSheet" value="0"/>
<parameter name="batchYear" class="java.lang.String"/>
<parameter name="date" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="advanceAccHT1" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccHT1]]></fieldDescription>
</field>
<field name="financialHT2" class="java.lang.String">
<fieldDescription><![CDATA[financialHT2]]></fieldDescription>
</field>
<field name="sn" class="java.lang.Integer">
<fieldDescription><![CDATA[sn]]></fieldDescription>
</field>
<field name="financialPT1" class="java.lang.String">
<fieldDescription><![CDATA[financialPT1]]></fieldDescription>
</field>
<field name="remarks" class="java.lang.String">
<fieldDescription><![CDATA[remarks]]></fieldDescription>
</field>
<field name="advanceAccHT2" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccHT2]]></fieldDescription>
</field>
<field name="auditHT2" class="java.lang.String">
<fieldDescription><![CDATA[auditHT2]]></fieldDescription>
</field>
<field name="advanceAccPT1" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccPT1]]></fieldDescription>
</field>
<field name="bcPT1" class="java.lang.String">
<fieldDescription><![CDATA[bcPT1]]></fieldDescription>
</field>
<field name="financialHT1" class="java.lang.String">
<fieldDescription><![CDATA[financialHT1]]></fieldDescription>
</field>
<field name="incomeHT2" class="java.lang.String">
<fieldDescription><![CDATA[incomeHT2]]></fieldDescription>
</field>
<field name="marketingPT1" class="java.lang.String">
<fieldDescription><![CDATA[marketingPT1]]></fieldDescription>
</field>
<field name="costHT2" class="java.lang.String">
<fieldDescription><![CDATA[costHT2]]></fieldDescription>
</field>
<field name="auditPT1" class="java.lang.String">
<fieldDescription><![CDATA[auditPT1]]></fieldDescription>
</field>
<field name="corporateHT1" class="java.lang.String">
<fieldDescription><![CDATA[corporateHT1]]></fieldDescription>
</field>
<field name="corporateHT2" class="java.lang.String">
<fieldDescription><![CDATA[corporateHT2]]></fieldDescription>
</field>
<field name="corporatePT1" class="java.lang.String">
<fieldDescription><![CDATA[corporatePT1]]></fieldDescription>
</field>
<field name="bcHT" class="java.lang.String">
<fieldDescription><![CDATA[bcHT]]></fieldDescription>
</field>
<field name="regNo" class="java.lang.String">
<fieldDescription><![CDATA[regNo]]></fieldDescription>
</field>
<field name="studentName" class="java.lang.String">
<fieldDescription><![CDATA[studentName]]></fieldDescription>
</field>
<field name="costHT1" class="java.lang.String">
<fieldDescription><![CDATA[costHT1]]></fieldDescription>
</field>
<field name="incomePT1" class="java.lang.String">
<fieldDescription><![CDATA[incomePT1]]></fieldDescription>
</field>
<field name="costPT1" class="java.lang.String">
<fieldDescription><![CDATA[costPT1]]></fieldDescription>
</field>
<field name="incomeHT1" class="java.lang.String">
<fieldDescription><![CDATA[incomeHT1]]></fieldDescription>
</field>
<field name="marketingHT" class="java.lang.String">
<fieldDescription><![CDATA[marketingHT]]></fieldDescription>
</field>
<field name="auditHT1" class="java.lang.String">
<fieldDescription><![CDATA[auditHT1]]></fieldDescription>
</field>
<field name="advanceAccPT2" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccPT2]]></fieldDescription>
</field>
<field name="auditPT2" class="java.lang.String">
<fieldDescription><![CDATA[auditPT2]]></fieldDescription>
</field>
<field name="corporatePT2" class="java.lang.String">
<fieldDescription><![CDATA[corporatePT2]]></fieldDescription>
</field>
<field name="financialPT2" class="java.lang.String">
<fieldDescription><![CDATA[financialPT2]]></fieldDescription>
</field>
<field name="costPT2" class="java.lang.String">
<fieldDescription><![CDATA[costPT2]]></fieldDescription>
</field>
<field name="bcPT2" class="java.lang.String">
<fieldDescription><![CDATA[bcPT2]]></fieldDescription>
</field>
<field name="marketingPT2" class="java.lang.String">
<fieldDescription><![CDATA[marketingPT2]]></fieldDescription>
</field>
<field name="incomePT2" class="java.lang.String">
<fieldDescription><![CDATA[incomePT2]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="49">
<staticText>
<reportElement x="262" y="0" width="273" height="16"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[ABC School]]></text>
</staticText>
<staticText>
<reportElement x="364" y="30" width="71" height="17"/>
<textElement textAlignment="Center">
<font size="11" isBold="true"/>
</textElement>

</staticText>
<staticText>
<reportElement x="337" y="16" width="124" height="16"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Score Sheet]]></text>
</staticText>
</band>
</title>
<detail>
<band height="16" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="19" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.Integer"><![CDATA[$F{sn}==0?null:$F{sn}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="18" y="0" width="119" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{studentName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="136" y="0" width="49" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{regNo}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="184" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{advanceAccHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="200" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{advanceAccHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="217" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{advanceAccPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="717" y="0" width="85" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{remarks}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="234" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{advanceAccPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="251" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{auditHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="268" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{auditHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="284" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{auditPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="300" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{auditPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="316" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{corporateHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="333" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{corporateHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="350" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{corporatePT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="367" y="0" width="20" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{corporatePT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="386" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{financialHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="403" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{financialHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="420" y="0" width="19" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{financialPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="438" y="0" width="21" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{financialPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="458" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{costHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="475" y="0" width="19" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{costHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="493" y="0" width="19" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{costPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="511" y="0" width="23" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{costPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="533" y="0" width="21" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{bcHT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="553" y="0" width="21" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{bcPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="573" y="0" width="22" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{bcPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="594" y="0" width="20" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{marketingHT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="613" y="0" width="20" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{marketingPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="700" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{incomePT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="683" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{incomePT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="666" y="0" width="18" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{incomeHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="632" y="0" width="19" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{marketingPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="650" y="0" width="17" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{incomeHT1}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>

我的碧 Jade 图片:enter image description here

已更新

新问题:

我的行重叠问题 enter image description here

最佳答案

在这种情况下,您必须将文本字段彼此靠近放置。

看两个例子:

1) 在此示例中,您的 excel 导出将不正确,就像您的情况一样。

enter image description here

2) 在这个例子中一切都会好的。

enter image description here

所以,你需要改变你的模板——字段位置尽可能彼此靠近。

更新
这是基于您的代码的屏幕截图。

1) 您的代码。

enter image description here

2) 我的更正。

enter image description here

你能看出这两个屏幕截图之间的区别吗?

更新 2
试试我的更正:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1 -->
<!-- 2016-08-17T14:43:37 -->
<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="ScoreSheetCAPII" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b3b3e463-8dd6-416e-a615-42daac244b2a">
<property name="ireport.zoom" value="3.897434200000008"/>
<property name="ireport.x" value="2104"/>
<property name="ireport.y" value="122"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.column.width" value="100"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="detectCellType" value="true"/>
<property name="onePagePerSheet" value="false"/>
<property name="whitePageBackground" value="false"/>
<property name="ignoreGraphics" value="false"/>
<property name="collapseRowSpan" value="true"/>
<property name="ignoreCellBorder" value="true"/>
<property name="fontSizeFixEnabled" value="true"/>
<property name="maximumRowsPerSheet" value="0"/>
<parameter name="batchYear" class="java.lang.String"/>
<parameter name="date" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="advanceAccHT1" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccHT1]]></fieldDescription>
</field>
<field name="financialHT2" class="java.lang.String">
<fieldDescription><![CDATA[financialHT2]]></fieldDescription>
</field>
<field name="sn" class="java.lang.Integer">
<fieldDescription><![CDATA[sn]]></fieldDescription>
</field>
<field name="financialPT1" class="java.lang.String">
<fieldDescription><![CDATA[financialPT1]]></fieldDescription>
</field>
<field name="remarks" class="java.lang.String">
<fieldDescription><![CDATA[remarks]]></fieldDescription>
</field>
<field name="advanceAccHT2" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccHT2]]></fieldDescription>
</field>
<field name="auditHT2" class="java.lang.String">
<fieldDescription><![CDATA[auditHT2]]></fieldDescription>
</field>
<field name="advanceAccPT1" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccPT1]]></fieldDescription>
</field>
<field name="bcPT1" class="java.lang.String">
<fieldDescription><![CDATA[bcPT1]]></fieldDescription>
</field>
<field name="financialHT1" class="java.lang.String">
<fieldDescription><![CDATA[financialHT1]]></fieldDescription>
</field>
<field name="incomeHT2" class="java.lang.String">
<fieldDescription><![CDATA[incomeHT2]]></fieldDescription>
</field>
<field name="marketingPT1" class="java.lang.String">
<fieldDescription><![CDATA[marketingPT1]]></fieldDescription>
</field>
<field name="costHT2" class="java.lang.String">
<fieldDescription><![CDATA[costHT2]]></fieldDescription>
</field>
<field name="auditPT1" class="java.lang.String">
<fieldDescription><![CDATA[auditPT1]]></fieldDescription>
</field>
<field name="corporateHT1" class="java.lang.String">
<fieldDescription><![CDATA[corporateHT1]]></fieldDescription>
</field>
<field name="corporateHT2" class="java.lang.String">
<fieldDescription><![CDATA[corporateHT2]]></fieldDescription>
</field>
<field name="corporatePT1" class="java.lang.String">
<fieldDescription><![CDATA[corporatePT1]]></fieldDescription>
</field>
<field name="bcHT" class="java.lang.String">
<fieldDescription><![CDATA[bcHT]]></fieldDescription>
</field>
<field name="regNo" class="java.lang.String">
<fieldDescription><![CDATA[regNo]]></fieldDescription>
</field>
<field name="studentName" class="java.lang.String">
<fieldDescription><![CDATA[studentName]]></fieldDescription>
</field>
<field name="costHT1" class="java.lang.String">
<fieldDescription><![CDATA[costHT1]]></fieldDescription>
</field>
<field name="incomePT1" class="java.lang.String">
<fieldDescription><![CDATA[incomePT1]]></fieldDescription>
</field>
<field name="costPT1" class="java.lang.String">
<fieldDescription><![CDATA[costPT1]]></fieldDescription>
</field>
<field name="incomeHT1" class="java.lang.String">
<fieldDescription><![CDATA[incomeHT1]]></fieldDescription>
</field>
<field name="marketingHT" class="java.lang.String">
<fieldDescription><![CDATA[marketingHT]]></fieldDescription>
</field>
<field name="auditHT1" class="java.lang.String">
<fieldDescription><![CDATA[auditHT1]]></fieldDescription>
</field>
<field name="advanceAccPT2" class="java.lang.String">
<fieldDescription><![CDATA[advanceAccPT2]]></fieldDescription>
</field>
<field name="auditPT2" class="java.lang.String">
<fieldDescription><![CDATA[auditPT2]]></fieldDescription>
</field>
<field name="corporatePT2" class="java.lang.String">
<fieldDescription><![CDATA[corporatePT2]]></fieldDescription>
</field>
<field name="financialPT2" class="java.lang.String">
<fieldDescription><![CDATA[financialPT2]]></fieldDescription>
</field>
<field name="costPT2" class="java.lang.String">
<fieldDescription><![CDATA[costPT2]]></fieldDescription>
</field>
<field name="bcPT2" class="java.lang.String">
<fieldDescription><![CDATA[bcPT2]]></fieldDescription>
</field>
<field name="marketingPT2" class="java.lang.String">
<fieldDescription><![CDATA[marketingPT2]]></fieldDescription>
</field>
<field name="incomePT2" class="java.lang.String">
<fieldDescription><![CDATA[incomePT2]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="49">
<staticText>
<reportElement x="0" y="0" width="802" height="16" uuid="b3f33d10-d908-4673-bdac-ac2f62e1abfd"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[ABC School]]></text>
</staticText>
<staticText>
<reportElement x="0" y="32" width="802" height="17" uuid="0e00356f-d1a8-4165-9ebe-0a63c44c6a0a"/>
<textElement textAlignment="Center">
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[CAP II Level]]></text>
</staticText>
<staticText>
<reportElement x="0" y="16" width="802" height="16" uuid="bde62bca-3aea-4354-bc85-fa45dcecaf2c"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Score Sheet]]></text>
</staticText>
</band>
</title>
<detail>
<band height="16" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="19" height="16" uuid="b5db95ef-b440-499a-a847-bd03fca30eda"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{sn}==0?null:$F{sn}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="19" y="0" width="117" height="16" uuid="183b3143-6880-4820-b530-dd62ca7d74c6"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{studentName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="136" y="0" width="48" height="16" uuid="d0a2e025-370c-40d3-b411-5f6fd5eed8fb"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{regNo}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="184" y="0" width="16" height="16" uuid="20c3c6b0-52c5-4124-81f7-5ed2064f9bbf"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{advanceAccHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="200" y="0" width="17" height="16" uuid="7cdf00f9-f69f-4167-9a9b-64410aa04397"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{advanceAccHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="217" y="0" width="16" height="16" uuid="f93971fd-aee2-4315-bea3-8df4a164ade8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{advanceAccPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="717" y="0" width="85" height="16" uuid="8684224a-4ebe-44a2-82cb-0cbbab8020ee"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{remarks}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="233" y="0" width="18" height="16" uuid="04daeb6a-954d-46dd-843d-609ac0b2f453"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{advanceAccPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="251" y="0" width="17" height="16" uuid="842932fb-bd92-4d12-bb8e-25713df7db8b"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{auditHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="268" y="0" width="16" height="16" uuid="95cbcd97-be41-497d-b403-993600b5506f"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{auditHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="284" y="0" width="16" height="16" uuid="05c6721e-e7aa-4ef8-8a40-372a5050f661"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{auditPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="300" y="0" width="16" height="16" uuid="cd2cad02-67b7-4a54-abee-025c99183a83"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{auditPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="316" y="0" width="17" height="16" uuid="91d90809-18cd-4c88-b2d5-47fb630d3825"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{corporateHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="333" y="0" width="17" height="16" uuid="aa685841-a795-4e0e-bc1e-5b64e1fc1ae3"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{corporateHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="350" y="0" width="17" height="16" uuid="6ee0482c-3db7-4b00-9b73-c6e3d41572c2"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{corporatePT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="367" y="0" width="19" height="16" uuid="190c08ce-84f7-4c73-9d12-a2985557ca33"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{corporatePT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="386" y="0" width="17" height="16" uuid="12b37691-dbf6-4d7c-94d9-67f2a60f0ec0"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{financialHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="403" y="0" width="17" height="16" uuid="b77c3a90-d01c-4c8b-bce4-589b45e65361"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{financialHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="420" y="0" width="18" height="16" uuid="9328abd4-60fc-49ad-9dfd-e6428090cb14"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{financialPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="438" y="0" width="20" height="16" uuid="af7c037a-1cf9-4824-b7f8-7d4a1c908933"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{financialPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="458" y="0" width="17" height="16" uuid="9c42de03-c7a8-4401-be43-47b3eba26467"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{costHT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="475" y="0" width="19" height="16" uuid="05ee6a0e-8a98-4fe8-8468-d528f6525310"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{costHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="494" y="0" width="18" height="16" uuid="40fd7021-60d3-4b01-adf7-faac7228e2c2"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{costPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="512" y="0" width="21" height="16" uuid="fccd0c9e-9106-46ef-af73-e5d23b7a2b20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{costPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="533" y="0" width="20" height="16" uuid="65540391-9b31-4f54-9e87-4eb04b210b86"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bcHT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="553" y="0" width="20" height="16" uuid="ea8b1ae8-9421-437d-9012-89bfcb0d22dc"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bcPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="573" y="0" width="21" height="16" uuid="6a00db3f-7d10-4e31-96ca-7029668f6ede"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bcPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="594" y="0" width="19" height="16" uuid="e3b69af2-b945-4e2b-ac06-1f691fab220a"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{marketingHT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="613" y="0" width="19" height="16" uuid="e79789d6-30b1-4fd8-88d2-0231c2473e3b"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{marketingPT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="700" y="0" width="17" height="16" uuid="d901ebb0-2e6d-469a-b813-f9c8fc950026"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{incomePT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="683" y="0" width="17" height="16" uuid="f46ce9d6-2da3-4b0d-897d-b54cc992df37"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{incomePT1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="666" y="0" width="17" height="16" uuid="b08e937d-d1b7-42a7-83d0-b2e3965e7eff"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{incomeHT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="632" y="0" width="18" height="16" uuid="b7b95e62-c26f-4166-b971-ade1377e5bc1"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{marketingPT2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="650" y="0" width="16" height="16" uuid="fa11ebb3-539a-4cb0-8c7b-b9a5073cd331"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{incomeHT1}]]></textFieldExpression>
</textField>
</band>
</detail>

截图:

enter image description here

关于jasper-reports - 从 jasper 导出时 excel 文件中的空列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38989643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com