我正在使用jasper报告来创建PDF文档。我在主文档中使用了一个Subreport。这个子报表由3个文本字段和一行组成。我使用javabean数据源来填充值。现在,如果数据源返回空值,我看不到行。任何人都可以指导我如何解决这个问题。行在子报告碧玉报告中不可见?
下面你可以看到XML代码,我在JRXML 文件用来画线:
<line direction="TopDown">
<reportElement mode="Transparent" x="-6" y="17" width="480" height="0"
forecolor="#C6C8CA" key="line-1" isPrintInFirstWholeBand="true"/>
<graphicElement stretchType="NoStretch">
<pen lineWidth="0.25" lineStyle="Solid"/>
</graphicElement>
</line>