我在Jasper studio 5.6.2上创建了一个jasper报告。它有动态文本字段,显示字符串列表中的字符串注释。生成的pdf报告的注释高度是固定的,即使注释中的单词数量是10或10000.我认为我的下面的方法会显示更短或最小的高度=" 80" 10个单词,如果单词数量增加,则会动态或增加高度。
我的jrxml文件
<subDataset name="Dataset2" uuid="b6a2d9e6-7689-4fe6-a101-5298242aadf6">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter "/>
<queryString language="SQL">
<![CDATA[]]>
</queryString>
<field name="_THIS" class="java.lang.String">
<fieldDescription><![CDATA[_THIS]]></fieldDescription>
</field>
</subDataset>
.....
<detail>
<band height="550" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<componentElement>
<reportElement key="" isPrintRepeatedValues="false" x="0" y="0" width="572" height="550" isRemoveLineWhenBlank="true" uuid="ba9c4d45-37c6-43cf-be92-a0be635bd27d">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" whenNoDataType="AllSectionsNoDetail">
<datasetRun subDataset="Dataset2" uuid="d3156b50-4ed0-493c-85fe-68885a491427">
<datasetParameter name="comments">
<datasetParameterExpression><![CDATA[$P{commentList}]]></datasetParameterExpression>
</datasetParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{commentList})]]></dataSourceExpression>
</datasetRun>
<jr:column width="572" uuid="d2b39095-d113-461a-989e-ee62f0d7217c">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<jr:columnHeader style="Style1" height="30">
<staticText>
<reportElement x="0" y="0" width="572" height="30" uuid="a0ef8f95-951f-4518-988a-16b5f3c4b078"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="DejaVu Sans" isBold="true"/>
</textElement>
<text><![CDATA[COMMENTS]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="Table 2_TD" height="80">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="572" height="80" uuid="2cd9fc51-8cc5-46cd-b917-a33a91521417">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{_THIS}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
我做错了什么?即使单词数量不同,为什么评论高度保持不变?