Jan Kohnert wrote:
Hello List,

is it possible to output formatted numbers using FOP?
For Example centered by the decimalpoint?

like:
   78.00
 123.00
     0.99
This is more of an XSL question, but I think what you want is:

Currency ($) version we use:

<fo:table-cell text-align="right" margin-top="1pt">
  <fo:block font-weight="bold" padding-top="2pt">
    <xsl:value-of select="format-number(AMOUNT,'$,###.00')"/>
  </fo:block>
</fo:table-cell>

Here's a link with more useful info I found on Google ("xsl format-number"):

http://www.w3schools.com/xsl/func_formatnumber.asp

Here's how I use format-number() to calculate the margin-top of fo:region-body (and extent of fo:region-before) to create a dynamically sized fo:region-before:

<xsl:attribute name="margin-top"><xsl:value-of select="format-number($varHeaderMinHeight_DEFAULT+(8*$varLineHeight_DEFAULT)+.1,'#.00')"/><xsl:value-of select="$varUnitOfMeasure_DEFAULT"/></xsl:attribute>

Hope this helps!

Web Maestro Clay

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to