Jasper reports “如何在jasper report 5.5.1中显示第x页,共y页”;“单个文本字段”;这是什么问题?

Jasper reports “如何在jasper report 5.5.1中显示第x页,共y页”;“单个文本字段”;这是什么问题?,jasper-reports,Jasper Reports,我的情况是,我需要页脚中的页码,格式如下: -------------------------------------------------------------------------------- page 1 of 4212 printed date: 页码应与左边距左对齐。我用了这个表达 "Page "+$V{PAGE_NUMBER}+ " of "+ $V{PAGE_NUMBER} 但它总

我的情况是,我需要页脚中的页码,格式如下:

--------------------------------------------------------------------------------
page 1 of 4212                                              printed date:
页码应与左边距左对齐。我用了这个表达

"Page "+$V{PAGE_NUMBER}+ " of "+ $V{PAGE_NUMBER}
但它总是有产出

"Page 1 of 1"
如何在左对齐的单个文本字段中实现它??? 请帮我整理一下。

请参阅:

使用此定义创建变量(注意resetType)


页码字段(注意评估时间):


<variable name="currentPageNumber" class="java.lang.Integer" resetType="Page">
<variableExpression><![CDATA[$V{PAGE_NUMBER}]]></variableExpression>
</variable>
<textField evaluationTime="Auto">
<reportElement uuid="847e339f-a1a6-492d-868b-b233f71785b4" x="166" y="22" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$V{currentPageNumber} + " of " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>