无法增加 Jasper 报表中的列标题高度



编译时出现以下错误:

[jrc] net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
[jrc]      1. The title section, the page and column headers and footers and the margins do not fit the page height.
[jrc]      2. The page and column headers and footers and the margins do not fit the page height.
[jrc]      3. The page and column headers and footers and the margins do not fit the last page height.

以下报告存在问题:

<?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="ReturnDeliveryNoteColumnHeader" pageWidth="555" pageHeight="30" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" uuid="4328d8a4-e5d5-4d7d-9fba-b42407325799">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<columnHeader>
<band height="30" splitType="Stretch"/>
</columnHeader>
</jasperReport>

当带的高度增加到30以上时,就会出现问题。另一个报表将此报表用作"页眉"带中的子报表。我将页眉带的高度和页眉内的子报表高度更改为50,但仍然出现错误。

您的模板从开始

<jasperReport ... pageHeight="30" ...>

因此,将列标题带的高度增加到30以上会使其不再适合页面。

如果您想要更高的色带,请使用足够大的页面高度来容纳该色带。

将splitType="Stretch"更改为另一种方法可能是错误的,并且u使用了页面的最大大小

最新更新