|
|
@ -4,6 +4,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
|
|
xmlns="http://jasperreports.sourceforge.net/jasperreports"> |
|
|
|
xmlns="http://jasperreports.sourceforge.net/jasperreports"> |
|
|
|
<xsl:param name="font" select="'Liberation Sans'" /><!--TODO {$font} als style--> |
|
|
|
<xsl:param name="font" select="'Liberation Sans'" /><!--TODO {$font} als style--> |
|
|
|
<xsl:output method="xml" encoding="UTF-8"/> |
|
|
|
<xsl:output method="xml" encoding="UTF-8"/> |
|
|
|
|
|
|
|
|
|
|
|
<xsl:template name="generateJasperReport"> |
|
|
|
<xsl:template name="generateJasperReport"> |
|
|
|
<xsl:param name="isMainReport" select="'true'" /> |
|
|
|
<xsl:param name="isMainReport" select="'true'" /> |
|
|
|
<xsl:param name="ergebniselementOrdnr" select="0" /> |
|
|
|
<xsl:param name="ergebniselementOrdnr" select="0" /> |
|
|
@ -22,7 +23,7 @@ xmlns="http://jasperreports.sourceforge.net/jasperreports"> |
|
|
|
<xsl:param name="std_spaltenbreite" select="'12'" /> |
|
|
|
<xsl:param name="std_spaltenbreite" select="'12'" /> |
|
|
|
<xsl:param name="std_zeilenhoehe_header" select="30" /> |
|
|
|
<xsl:param name="std_zeilenhoehe_header" select="30" /> |
|
|
|
<xsl:param name="std_zeilenhoehe_tablerow" select="25" /> |
|
|
|
<xsl:param name="std_zeilenhoehe_tablerow" select="25" /> |
|
|
|
<xsl:param name="isMacroReport" select="'false'" /> |
|
|
|
<xsl:variable name="isMacroReport" select="/ergebnisse/@isMakro" /> |
|
|
|
|
|
|
|
|
|
|
|
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" |
|
|
|
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" |
|
|
|
name="{/ergebnisse/ergebnis[@ordnr=$ergebniselementOrdnr]/maskenname}" |
|
|
|
name="{/ergebnisse/ergebnis[@ordnr=$ergebniselementOrdnr]/maskenname}" |
|
|
@ -58,7 +59,9 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
</xsl:if> |
|
|
|
</xsl:if> |
|
|
|
<xsl:call-template name="jr_fields" > |
|
|
|
<xsl:call-template name="jr_fields" > |
|
|
|
<xsl:with-param name="ergebniselementOrdnr" select="$ergebniselementOrdnr"/> |
|
|
|
<xsl:with-param name="ergebniselementOrdnr" select="$ergebniselementOrdnr"/> |
|
|
|
<xsl:with-param name="isMacroReport" select="/ergebnisse/@isMakro" /> |
|
|
|
<xsl:with-param name="isMacroReport" select="$isMacroReport" /> |
|
|
|
|
|
|
|
<xsl:with-param name="isMainReport" select="$isMainReport" /> |
|
|
|
|
|
|
|
|
|
|
|
</xsl:call-template> |
|
|
|
</xsl:call-template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -118,6 +121,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:call-template name="jr_textField"> |
|
|
|
<xsl:call-template name="jr_textField"> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebniselementOrdnr" /> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebniselementOrdnr" /> |
|
|
|
<xsl:with-param name="fieldName" select="wert" /> |
|
|
|
<xsl:with-param name="fieldName" select="wert" /> |
|
|
|
|
|
|
|
<xsl:with-param name="colName" select="f_name" /> |
|
|
|
<xsl:with-param name="colId" select="@id" /> |
|
|
|
<xsl:with-param name="colId" select="@id" /> |
|
|
|
<xsl:with-param name="x" select="$columnX" /> |
|
|
|
<xsl:with-param name="x" select="$columnX" /> |
|
|
|
<xsl:with-param name="width" select="$columnWidth" /> |
|
|
|
<xsl:with-param name="width" select="$columnWidth" /> |
|
|
@ -132,6 +136,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:call-template name="jr_textfield_levelx"> |
|
|
|
<xsl:call-template name="jr_textfield_levelx"> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebniselementOrdnr" /> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebniselementOrdnr" /> |
|
|
|
<xsl:with-param name="fieldName" select="wert" /> |
|
|
|
<xsl:with-param name="fieldName" select="wert" /> |
|
|
|
|
|
|
|
<xsl:with-param name="colName" select="f_name" /> |
|
|
|
<xsl:with-param name="colId" select="@id" /> |
|
|
|
<xsl:with-param name="colId" select="@id" /> |
|
|
|
<xsl:with-param name="x" select="$columnX" /> |
|
|
|
<xsl:with-param name="x" select="$columnX" /> |
|
|
|
<xsl:with-param name="width" select="$columnWidth" /> |
|
|
|
<xsl:with-param name="width" select="$columnWidth" /> |
|
|
@ -239,11 +244,12 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
</xsl:template> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template name="jr_fields"> |
|
|
|
<xsl:template name="jr_fields"> |
|
|
|
<xsl:param name="ergebniselementOrdnr" select="0"/> |
|
|
|
<xsl:param name="ergebniselementOrdnr" select="0"/> |
|
|
|
|
|
|
|
<xsl:param name="isMainReport" /> |
|
|
|
<xsl:param name="isMacroReport" /> |
|
|
|
<xsl:param name="isMacroReport" /> |
|
|
|
<field name="Berichtsname" class="java.lang.String"> |
|
|
|
<field name="Berichtsname" class="java.lang.String"> |
|
|
|
<fieldDescription> |
|
|
|
<fieldDescription> |
|
|
|
<xsl:choose> |
|
|
|
<xsl:choose> |
|
|
|
<xsl:when test="$isMacroReport = 'true'"> |
|
|
|
<xsl:when test="$isMacroReport = 'true' and $isMainReport= 'true'"> |
|
|
|
<xsl:text><![CDATA[/ergebnisse/makro/name]]></xsl:text></xsl:when> |
|
|
|
<xsl:text><![CDATA[/ergebnisse/makro/name]]></xsl:text></xsl:when> |
|
|
|
<xsl:otherwise><xsl:text><![CDATA[/ergebnisse/ergebnis[ @ordnr=']]></xsl:text> |
|
|
|
<xsl:otherwise><xsl:text><![CDATA[/ergebnisse/ergebnis[ @ordnr=']]></xsl:text> |
|
|
|
<xsl:value-of select="$ergebniselementOrdnr"/> |
|
|
|
<xsl:value-of select="$ergebniselementOrdnr"/> |
|
|
@ -265,7 +271,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
</field> |
|
|
|
</field> |
|
|
|
<xsl:comment> dann die Tabellenspalten </xsl:comment> |
|
|
|
<xsl:comment> dann die Tabellenspalten </xsl:comment> |
|
|
|
|
|
|
|
|
|
|
|
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement"> |
|
|
|
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]"> |
|
|
|
<xsl:variable name="ordnr"><xsl:value-of select="@ordnr"/></xsl:variable> |
|
|
|
<xsl:variable name="ordnr"><xsl:value-of select="@ordnr"/></xsl:variable> |
|
|
|
<xsl:for-each select="sqlerg/complete_headers/header"> |
|
|
|
<xsl:for-each select="sqlerg/complete_headers/header"> |
|
|
|
<xsl:variable name="jasperFieldname"> |
|
|
|
<xsl:variable name="jasperFieldname"> |
|
|
@ -294,9 +300,33 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
</field> |
|
|
|
</field> |
|
|
|
</xsl:if> |
|
|
|
</xsl:if> |
|
|
|
</xsl:for-each> |
|
|
|
</xsl:for-each> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- dann die Legende pro Unterbericht--> |
|
|
|
|
|
|
|
<xsl:if test="$isMainReport='false'"> |
|
|
|
|
|
|
|
<xsl:for-each select="distinct-values(../completefields/feld/@varname)"> |
|
|
|
|
|
|
|
<xsl:variable name="jasperFieldname"> |
|
|
|
|
|
|
|
<xsl:call-template name="createJasperFieldname"> |
|
|
|
|
|
|
|
<xsl:with-param name="fieldName_orig" select="."/> |
|
|
|
|
|
|
|
</xsl:call-template> |
|
|
|
|
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
<xsl:variable name="varname"> |
|
|
|
|
|
|
|
<xsl:value-of select="." /> |
|
|
|
|
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
<!-- zuerst Label --> |
|
|
|
|
|
|
|
<field name="{concat('legende_',$jasperFieldname,'_label')}" class="java.lang.String"> |
|
|
|
|
|
|
|
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[@ordnr=]]></xsl:text><xsl:value-of select="$ordnr"/><xsl:text><![CDATA[]/completefields/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/@varname]]></xsl:text></fieldDescription> |
|
|
|
|
|
|
|
</field> |
|
|
|
|
|
|
|
<!--dann Wert--> |
|
|
|
|
|
|
|
<field name="{concat('legende_',$jasperFieldname,'_value')}" class="java.lang.String"> |
|
|
|
|
|
|
|
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[@ordnr=]]></xsl:text><xsl:value-of select="$ordnr"/><xsl:text><![CDATA[]/felder/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/value_caption]]></xsl:text></fieldDescription> |
|
|
|
|
|
|
|
</field> |
|
|
|
</xsl:for-each> |
|
|
|
</xsl:for-each> |
|
|
|
<!-- dann die Legende--> |
|
|
|
</xsl:if> |
|
|
|
<xsl:for-each select="distinct-values(//ergebnisse/ergebnis/completefields/feld/@varname)"> |
|
|
|
|
|
|
|
|
|
|
|
</xsl:for-each><!-- Ende Ergebniselemente --> |
|
|
|
|
|
|
|
<!-- dann die Legende Hauptbericht--> |
|
|
|
|
|
|
|
<xsl:if test="$isMainReport='true'"> |
|
|
|
|
|
|
|
<xsl:for-each select="distinct-values(/ergebnisse/ergebnis/completefields/feld/@varname)"> |
|
|
|
<xsl:variable name="jasperFieldname"> |
|
|
|
<xsl:variable name="jasperFieldname"> |
|
|
|
<xsl:call-template name="createJasperFieldname"> |
|
|
|
<xsl:call-template name="createJasperFieldname"> |
|
|
|
<xsl:with-param name="fieldName_orig" select="."/> |
|
|
|
<xsl:with-param name="fieldName_orig" select="."/> |
|
|
@ -313,8 +343,8 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<field name="{concat('legende_',$jasperFieldname,'_value')}" class="java.lang.String"> |
|
|
|
<field name="{concat('legende_',$jasperFieldname,'_value')}" class="java.lang.String"> |
|
|
|
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/value_caption]]></xsl:text></fieldDescription> |
|
|
|
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/value_caption]]></xsl:text></fieldDescription> |
|
|
|
</field> |
|
|
|
</field> |
|
|
|
|
|
|
|
|
|
|
|
</xsl:for-each> |
|
|
|
</xsl:for-each> |
|
|
|
|
|
|
|
</xsl:if> |
|
|
|
<!--Standatum und User:--> |
|
|
|
<!--Standatum und User:--> |
|
|
|
<field name="standdatum" class="java.lang.String"> |
|
|
|
<field name="standdatum" class="java.lang.String"> |
|
|
|
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/stand]]></xsl:text></fieldDescription> |
|
|
|
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/stand]]></xsl:text></fieldDescription> |
|
|
@ -479,6 +509,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:template name="jr_textField"> |
|
|
|
<xsl:template name="jr_textField"> |
|
|
|
<xsl:param name="ergebnisElementOrdnr" /> |
|
|
|
<xsl:param name="ergebnisElementOrdnr" /> |
|
|
|
<xsl:param name="fieldName" /> |
|
|
|
<xsl:param name="fieldName" /> |
|
|
|
|
|
|
|
<xsl:param name="colName" /> |
|
|
|
<xsl:param name="colId" /> |
|
|
|
<xsl:param name="colId" /> |
|
|
|
<xsl:param name="x" select="'0'" /> |
|
|
|
<xsl:param name="x" select="'0'" /> |
|
|
|
<xsl:param name="width" select="'0'" /> |
|
|
|
<xsl:param name="width" select="'0'" /> |
|
|
@ -503,7 +534,34 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:with-param name="colId" select="$colId" /> |
|
|
|
<xsl:with-param name="colId" select="$colId" /> |
|
|
|
</xsl:call-template> |
|
|
|
</xsl:call-template> |
|
|
|
</xsl:variable> |
|
|
|
</xsl:variable> |
|
|
|
<xsl:if test="normalize-space($jasperFieldname)!=''"> <!-- keine leeren Feldnamen--> |
|
|
|
<!--start Feldausgabe, zuerst prüfen ob besonderer Feldname--> |
|
|
|
|
|
|
|
<xsl:choose> |
|
|
|
|
|
|
|
<xsl:when test="normalize-space($jasperFieldname)=''"> <!-- keine leeren Feldnamen--> |
|
|
|
|
|
|
|
</xsl:when> |
|
|
|
|
|
|
|
<xsl:when test="starts-with($colName,'_graph')"> |
|
|
|
|
|
|
|
<xsl:variable name="alignLeft"> |
|
|
|
|
|
|
|
<xsl:choose> |
|
|
|
|
|
|
|
<xsl:when test="starts-with($colName,'_graphbarright')"> |
|
|
|
|
|
|
|
<xsl:text>false</xsl:text> |
|
|
|
|
|
|
|
</xsl:when> |
|
|
|
|
|
|
|
<xsl:otherwise> |
|
|
|
|
|
|
|
<xsl:text>true</xsl:text> |
|
|
|
|
|
|
|
</xsl:otherwise> |
|
|
|
|
|
|
|
</xsl:choose> |
|
|
|
|
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
<image scaleImage="RealSize" evaluationTime="Band"> |
|
|
|
|
|
|
|
<reportElement x="{$x}" y="0" width="{$width}" height="{$height}" /> |
|
|
|
|
|
|
|
<imageExpression><xsl:text><![CDATA[net.sf.jasperreports.renderers.SimpleDataRenderer.getInstance(de.superx.rpta.SvgProducer.SimpleBarChart($F{]]></xsl:text><xsl:value-of select="$jasperFieldname" /> |
|
|
|
|
|
|
|
<xsl:text>},100,</xsl:text> |
|
|
|
|
|
|
|
<xsl:value-of select="$width"/><xsl:text>,</xsl:text> |
|
|
|
|
|
|
|
<xsl:value-of select="$height"/><xsl:text>,"#cccccc","steelblue",</xsl:text> |
|
|
|
|
|
|
|
<xsl:value-of select="$alignLeft"/><xsl:text>).getBytes("UTF-8"))</xsl:text></imageExpression> |
|
|
|
|
|
|
|
</image> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:when> |
|
|
|
|
|
|
|
<xsl:otherwise> |
|
|
|
|
|
|
|
<!-- normales Textfeld: --> |
|
|
|
|
|
|
|
|
|
|
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> |
|
|
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> |
|
|
|
<reportElement stretchType="ContainerHeight" x="{$x}" y="0" width="{$width}" height="{$height}" > |
|
|
|
<reportElement stretchType="ContainerHeight" x="{$x}" y="0" width="{$width}" height="{$height}" > |
|
|
|
<xsl:attribute name="style"> |
|
|
|
<xsl:attribute name="style"> |
|
|
@ -533,7 +591,10 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:with-param name="fieldName" select="$fieldName" /> |
|
|
|
<xsl:with-param name="fieldName" select="$fieldName" /> |
|
|
|
</xsl:call-template> |
|
|
|
</xsl:call-template> |
|
|
|
</textField> |
|
|
|
</textField> |
|
|
|
</xsl:if> |
|
|
|
|
|
|
|
|
|
|
|
</xsl:otherwise><!-- ende normales Textfeld--> |
|
|
|
|
|
|
|
</xsl:choose> |
|
|
|
|
|
|
|
|
|
|
|
</xsl:template> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template name="getFieldType"> |
|
|
|
<xsl:template name="getFieldType"> |
|
|
|
<xsl:param name="ergebnisElementOrdnr" /> |
|
|
|
<xsl:param name="ergebnisElementOrdnr" /> |
|
|
@ -812,6 +873,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:template name="jr_textfield_levelx"> |
|
|
|
<xsl:template name="jr_textfield_levelx"> |
|
|
|
<xsl:param name="ergebnisElementOrdnr" /> |
|
|
|
<xsl:param name="ergebnisElementOrdnr" /> |
|
|
|
<xsl:param name="fieldName" /> |
|
|
|
<xsl:param name="fieldName" /> |
|
|
|
|
|
|
|
<xsl:param name="colName" /> |
|
|
|
<xsl:param name="colId" /> |
|
|
|
<xsl:param name="colId" /> |
|
|
|
<xsl:param name="x" /> |
|
|
|
<xsl:param name="x" /> |
|
|
|
<xsl:param name="width" /> |
|
|
|
<xsl:param name="width" /> |
|
|
@ -825,6 +887,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:with-param name="tableRowLevel" select="$tableRowLevel" /> |
|
|
|
<xsl:with-param name="tableRowLevel" select="$tableRowLevel" /> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebnisElementOrdnr" /> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebnisElementOrdnr" /> |
|
|
|
<xsl:with-param name="fieldName" select="$fieldName" /> |
|
|
|
<xsl:with-param name="fieldName" select="$fieldName" /> |
|
|
|
|
|
|
|
<xsl:with-param name="colName" select="$colName" /> |
|
|
|
<xsl:with-param name="colId" select="$colId" /> |
|
|
|
<xsl:with-param name="colId" select="$colId" /> |
|
|
|
<xsl:with-param name="x" select="$x" /> |
|
|
|
<xsl:with-param name="x" select="$x" /> |
|
|
|
<xsl:with-param name="width" select="$width" /> |
|
|
|
<xsl:with-param name="width" select="$width" /> |
|
|
@ -835,6 +898,7 @@ isIgnorePagination="{$isIgnorePagination}" > |
|
|
|
<xsl:with-param name="maxLevel" select="$maxLevel"/> |
|
|
|
<xsl:with-param name="maxLevel" select="$maxLevel"/> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebnisElementOrdnr" /> |
|
|
|
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebnisElementOrdnr" /> |
|
|
|
<xsl:with-param name="fieldName" select="$fieldName" /> |
|
|
|
<xsl:with-param name="fieldName" select="$fieldName" /> |
|
|
|
|
|
|
|
<xsl:with-param name="colName" select="$colName" /> |
|
|
|
<xsl:with-param name="colId" select="$colId" /> |
|
|
|
<xsl:with-param name="colId" select="$colId" /> |
|
|
|
<xsl:with-param name="x" select="$x" /> |
|
|
|
<xsl:with-param name="x" select="$x" /> |
|
|
|
<xsl:with-param name="width" select="$width" /> |
|
|
|
<xsl:with-param name="width" select="$width" /> |
|
|
|