我正在开发一个带有一个细节波段和一个使用条件样式的字段的报告。我在用快递。两条线之间的间距太大了。
我怎样才能使线条之间的空间最小化,使线条几乎是接触到的?
下面是报告XML。
<style name="DataHeaderTypeStyle">
<conditionalStyle>
<conditionExpression><![CDATA[$F{lineSectionType}==1]]></conditionExpression>
<style fontName="Courier New" fontSize="11"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[$F{lineSectionType}==2]]></conditionExpression>
<style fontName="Courier New" fontSize="7"/>
</conditionalStyle>
</style>
<queryString>
<![CDATA[]]>
</queryString>
<field name="lineSectionData" class="java.lang.String">
<fieldDescription><![CDATA[lineSectionData]]></fieldDescription>
</field>
<field name="lineSectionType" class="java.lang.Integer">
<fieldDescription><![CDATA[lineSectionType]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="14" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement style="DataHeaderTypeStyle" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="1" width="555" height="13">
<printWhenExpression><![CDATA[$F{lineSectionType}==1 || $F{lineSectionType}==2]]></printWhenExpression>
</reportElement>
<textElement>
<font fontName="Courier New" pdfFontName="Courier"/>
<paragraph lineSpacing="Fixed"/>
</textElement>
<textFieldExpression><![CDATA[$F{lineSectionData}]]></textFieldExpression>
</textField>
</band>
</detail>
发布于 2014-12-10 08:10:20
将Jaspersoft Studio属性设置为“文本字段”或“静态文本”,如下所示:
Proportional
行距0.4
(或类似)XML源应该类似于:
<textElement>
<font fontName="Courier"/>
<paragraph lineSpacing="Proportional" lineSpacingSize="0.4"/>
</textElement>
https://stackoverflow.com/questions/27368590
复制相似问题