我目前正在尝试使用Apache-FOP来生成发票。使用<fo:retrieve-marker/>
和<fo:marker/>
,我可以为每个页面创建分类汇总。
我想正确地格式化这个数字:
<fo:block text-align="right">
<fo:retrieve-marker retrieve-class-name="invoice-subtotal" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
</fo:block>
只给我简单的和(例如12045),我想要的是120,45。仅仅使用Apache-FOP 1.1就可以做到这一点吗?检索这个数字是在XSLT处理器之后完成的,所以我不能使用XSLT格式化函数。
谢谢你的帮助。
发布于 2013-03-15 18:10:33
好的。我的要求似乎是不可能的。我之前所做的是使用XSLT计算中间和:
<fo:marker marker-class-name="invoice-subtotal"><xsl:value-of select="itemTax/grossPriceRaw + sum(preceding::itemTax/grossPriceRaw)"/></fo:marker>
我解决这个问题的方法是,我的发票上的每个位置现在都有中间金额。因此,计算和格式化取决于编程语言(在本例中为java)。
我的标记定义现在看起来像这样:
<fo:marker marker-class-name="invoice-subtotal"><xsl:value-of select="intSum"/></fo:marker>
所以现在一切都很好。
谢谢你的帮助。
https://stackoverflow.com/questions/15408305
复制相似问题