Jasper reports 如何在jasper报告中显示页码
如何在jasper子报告中显示当前页码?我只在第一页使用了如下变量:Jasper reports 如何在jasper报告中显示页码,jasper-reports,subreport,Jasper Reports,Subreport,如何在jasper子报告中显示当前页码?我只在第一页使用了如下变量:$V{page\u NUMBER}和“(“+$V{page\u COUNT}+”),但是我们如何在所有子报告中显示呢?按照下面的模式,应该可以工作 <jasperReport> <title> </title> <detail> //Here goes all subreports </detail> <pageFooter> <textField e
$V{page\u NUMBER}和“(“+$V{page\u COUNT}+”)
,但是我们如何在所有子报告中显示呢?按照下面的模式,应该可以工作
<jasperReport>
<title>
</title>
<detail>
//Here goes all subreports
</detail>
<pageFooter>
<textField evaluationTime="Report">
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</pageFooter>
</jasperReport>
//下面是所有子报告
您必须使用页脚带
当必须显示总页数时,将$V{PAGE\u NUMBER}
的print when expression设置为“REPORT”
$V{PAGE_NUMBER}
在必须显示当前页码时将表达式打印为“NOW”
试试这个
<pageFooter>
<band height="22" splitType="Stretch">
<textField pattern="M/d/yy h:mm a">
<reportElement x="580" y="0" width="220" height="20" uuid="941d5c67-e986-4d5b-ba7e-2754f065e008"/>
<box padding="3"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA["Printed on : "+new java.util.Date()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="280" y="1" width="200" height="20" uuid="afe76ecf-00e9-4d52-a00b-44d38dc3aa65"/>
<box padding="3"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
您遇到了什么问题?我将页码和页数放在第一页,它将如何在所有页面上打印?在表格组件中,当我尝试使用PrintWheenPression中的字段时,它会给我找不到的错误字段。如果该列下没有值,我必须删除该列。我试图在printWhenExpression中使用参数和变量,但出现了相同的错误。