Browse Source

Pattern template erstellt

rpta_0.1_Release
Daniel Quathamer 12 months ago
parent
commit
e9da8803d8
  1. 44
      superx/xml/rpta_templates.xsl

44
superx/xml/rpta_templates.xsl

@ -486,25 +486,9 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -486,25 +486,9 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:if test="normalize-space($jasperFieldname)!=''"> <!-- keine leeren Feldnamen-->
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<xsl:attribute name="pattern">
<xsl:choose>
<xsl:when test="$fieldType='4'"> <!--integer-->
<xsl:text>0</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='3'"> <!--decimal-->
<xsl:text>#,##0.00;-#,##0.00</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='6'"> <!--date-->
<xsl:text>dd.MM.yyyy</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='8'"> <!--timestamp-->
<xsl:text>dd.MM.yyyy hh:mm:ss</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='9'"> <!--time-->
<xsl:text>hh:mm:ss</xsl:text>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="tableCellPattern">
<xsl:with-param name="fieldType" select="$fieldType" />
</xsl:call-template>
</xsl:attribute>
<reportElement stretchType="ContainerHeight" x="{$x}" y="0" width="{$width}" height="{$height}" >
<xsl:attribute name="style">
@ -925,4 +909,26 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -925,4 +909,26 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="tableCellPattern">
<xsl:param name="fieldType" />
<xsl:choose>
<xsl:when test="$fieldType='4'"> <!--integer-->
<xsl:text>0</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='3'"> <!--decimal-->
<xsl:text>#,##0.00;-#,##0.00</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='6'"> <!--date-->
<xsl:text>dd.MM.yyyy</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='8'"> <!--timestamp-->
<xsl:text>dd.MM.yyyy hh:mm:ss</xsl:text>
</xsl:when>
<xsl:when test="$fieldType='9'"> <!--time-->
<xsl:text>hh:mm:ss</xsl:text>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

Loading…
Cancel
Save